Skip to content

Keep rmaga inside rzl_array for lasym with ntor = 0 - #15

Open
CharlesCNorton wants to merge 2 commits into
jonathanschilling:masterfrom
CharlesCNorton:fix/eqfor-rmaga-ntor0
Open

Keep rmaga inside rzl_array for lasym with ntor = 0#15
CharlesCNorton wants to merge 2 commits into
jonathanschilling:masterfrom
CharlesCNorton:fix/eqfor-rmaga-ntor0

Conversation

@CharlesCNorton

Copy link
Copy Markdown
Contributor

Fixes #9.

For LASYM = T with NTOR = 0, read_indata leaves rcs = 0 because the cos(mu)sin(nv) basis type does not exist, and rmaga => rzl_array(1,:,0,rcs) in eqfor.f90 then points at type index 0 of a dimension declared 1:3*ntmax. rmaga is now associated only when rcs > 0 and otherwise points at a zero array of the same extent, which is the value the missing basis type contributes.

Checked with input.up_down_asymmetric_tokamak (VMEC++ test data) and a symmetric tokamak boundary run with LASYM = T: the wout files are unchanged bit for bit, and a build with -fcheck=all that used to stop at eqfor.f90:73 with Index '0' of dimension 4 of array 'rzl_array' outside of expected range (1:6) now terminates normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rmaga points outside rzl_array for lasym with ntor = 0

1 participant