! eqfor.f90:72-75
IF (lasym) THEN
rmaga => rzl_array(1,:,0,rcs)
zmaga => rzl_array(1,:,0,zcc+ntmax)
END IF
For LASYM = T with NTOR = 0, read_indata.f90:123-124 sets ntmax = 2, rsc = 2, zcc = 2 and leaves rcs at the 0 from read_indata.f90:105, since the cos(mu)sin(nv) basis does not exist without toroidal modes. The pointer then targets type index 0 of a dimension declared 1:3*ntmax.
Built with -fcheck=all, input.up_down_asymmetric_tokamak (VMEC++ test data; any lasym input with ntor = 0 does the same) stops at eqfor.f90:73:
Fortran runtime error: Index '0' of dimension 4 of array 'rzl_array' outside of expected range (1:6)
A release build reads the memory before the array. The value reaches eqfor.f90:751 (rax_asym(n) = -tz*rmaga(n1)) and the threed1 axis table at eqfor.f90:759, where the n = 0 factor tz = 0 hides it, so the table prints -0.0000E+00. The 2017 VMEC2000 8.52 source (eqfor.f:82) and PARVMEC carry the same association; associating rmaga only when rcs > 0 and using zero otherwise covers the ntor = 0 case.
For
LASYM = TwithNTOR = 0, read_indata.f90:123-124 setsntmax = 2,rsc = 2,zcc = 2and leavesrcsat the 0 from read_indata.f90:105, since the cos(mu)sin(nv) basis does not exist without toroidal modes. The pointer then targets type index 0 of a dimension declared1:3*ntmax.Built with
-fcheck=all,input.up_down_asymmetric_tokamak(VMEC++ test data; any lasym input withntor = 0does the same) stops at eqfor.f90:73:A release build reads the memory before the array. The value reaches eqfor.f90:751 (
rax_asym(n) = -tz*rmaga(n1)) and the threed1 axis table at eqfor.f90:759, where then = 0factortz = 0hides it, so the table prints-0.0000E+00. The 2017 VMEC2000 8.52 source (eqfor.f:82) and PARVMEC carry the same association; associatingrmagaonly whenrcs > 0and using zero otherwise covers thentor = 0case.