SPEC 3.20
Stepped Pressure Equilibrium Code
Todo List
Subprogram bnorml (mn, Ntz, efmn, ofmn)
There is a very clumsy attempt to parallelize this which could be greatly improved.
Subprogram casing (teta, zeta, gBn, icasing)

It would be MUCH faster to only require the tangential field on a regular grid!!!

Please check why \(B_s\) is not computed. Is it because \(B_s \nabla s \times {\bf n} = 0\) ?

This needs to be revised.

Subprogram curent (lvol, mn, Nt, Nz, iflag, ldItGp)
Perhaps this can be proved analytically; in any case it should be confirmed numerically.
Subprogram inputlist::lconstraint
if Lconstraint==2, under reconstruction.
Subprogram inputlist::wbuild_vector_potential
: what is this?
Type intghs_module::intghs_workspace
Zhisong might need to update the documentation of this type.
Subprogram ma02aa (lvol, NN)
If Lconstraint = 2, then \(\mu=\boldsymbol{\mu}_1\) is varied in order to satisfy the helicity constraint, and \(\Delta\psi_p=\boldsymbol{\mu}_2\) is not varied, and Nxdof=1. (under re-construction)
Subprogram pc00aa (NGdof, position, Nvol, mn, ie04dgf)
Unfortunately, E04DGF seems to require approximately \(3 N\) function evaluations before proceeding to minimize the energy functional, where there are \(N\) degrees of freedom. I don't know how to turn this off!
Subprogram pc00ab (mode, NGdof, Position, Energy, Gradient, nstate, iuser, ruser)
IT IS VERY LIKELY THAT FFTs WOULD BE FASTER!!!
Subprogram spec
If Lminimize.eq.1 , call pc00aa() to find minimum of energy functional using quasi-Newton, preconditioned conjugate gradient method, E04DGF
Subprogram stzxyz (lvol, stz, RpZ)
Please see co01aa() for documentation.