PrincetonUniversity / SPEC

The Stepped-Pressure Equilibrium Code, an advanced MRxMHD equilibrium solver.
https://princetonuniversity.github.io/SPEC/
GNU General Public License v3.0
24 stars 4 forks source link

Updated mp00ac.f90 to read and output gauge invariant helicity. #187

Open KseniaAleynikova opened 1 year ago

KseniaAleynikova commented 1 year ago

I believe this should be a standard way of working with helicity in SPEC that is why I do not use an extra flag with/without gauge invariant helicity. But tests should be done first.

jloizu commented 1 year ago

Great, Ksenia. My initial comments are:

smiet commented 1 year ago

Just had a look at the test logs (on the updated ci). The test run_fast_cylinder fails because of an out-of-bound index access in the solution-array.

Error termination. Backtrace:
At line 1067 of file /home/runner/work/SPEC/build/src/mp00ac_m.F90
Fortran runtime error: Index '0' of dimension 1 of array 'solution' below lower bound of 1

Despite this, the CI will probably still fail since the value of 'Helicity' in the outputs will be different from that in the pre-computed files that it is checked against.

For this change to be accepted we need to generate new test files with the correct value of Helicity using this convention. For this you should do the following steps:

@zhucaoxiang, @jloizu, @abaillod, could you comment on which Helicity convention is best convention and why?