Stellarator-Tools
pchelms.f90 File Reference

Contains module pchelms. More...

Modules

module  pchelms
 This file solves the helmholtz equation to set inital fields that match vmec and vacuum currents from the vector potential. Initial vector potential on the edge is supplied by the BMW code.
 

Functions/Subroutines

subroutine pchelms::run_pchelms
 Run the pchelms code to solve for inital jbsup values.
 
subroutine pchelms::curla_pchelms (Asubsmnf, Asubumnf, Asubvmnf,
 Compute real-space components of contravariant jac*B^i on half radial grid from curl(A). More...
 
subroutine pchelms::curlb_pchelms (ksupsmnf, ksupumnf, ksupvmnf, asubsmnf,
 Compute real-space components of contravariant jac*J^i on full radial grid from curl(B). More...
 
subroutine pchelms::cyl2vmec_a (A_r, A_p, A_z, cA_s, cA_u, cA_v)
 Convert cylindical vector potential to contravariant components. More...
 
subroutine pchelms::get_e_s (rij_h, zij_h, rs, zs, parity)
 Get the e_s basis vector. More...
 
subroutine pchelms::init_a (cA_s, cA_u, cA_v, A_s, A_u, A_v, parity)
 Initialize vector potential. More...
 
subroutine pchelms::init_f (Fsupsmn, Fsupumn, Fsupvmn, jcurrumn, jcurrvmn, p
 Initialize expected currents. More...
 
subroutine pchelms::compare_current (Fsupsmn, Fsupumn, Fsupvmn, jcurrumn, jc
 Compare Curl(Curl(A)) with the expected VMEC and vacuum currents. More...
 
subroutine pchelms::dump_b (js, iunit)
 Write out magnetic field to file. More...
 
subroutine pchelms::getfsq_pchelms
 The the current residual.
 
subroutine pchelms::cleanup
 Deallocate arrays.
 
subroutine pchelms::check_current
 Check that the line integral of Bsubuij equals the integrated toroidal current.
 
subroutine pchelms::compute_forces_lin
 Compute linear forces.
 
subroutine pchelms::backslv
 Update solution.
 
subroutine pchelms::init_pchelms
 Initialize helmholtz solver.
 
subroutine pchelms::compute_forces (lNLinear)
 Compute Fourier components of Curl(Curl(A)) - mu0J operator on full radial grid. More...
 
subroutine pchelms::boundaryconditions (Fsupsmn, Fsupumn, Fsupvmn, iparity)
 Apply boundary conditions. More...
 
subroutine pchelms::gmres_pchelms
 Setup and run GMRES solver for the helmholtz problem. More...
 
subroutine pchelms::matvec_pchelms (p, Ap, ndim)
 Serial callback function for MatVec GMRES routine. More...
 
subroutine pchelms::matvec_par_pchelms (ploc, Ap, nloc)
 Parallel callback function for MatVec GMRES routine. More...
 
subroutine pchelms::getnlforce_pchelms (xcstate, fsq_nl, bnorm)
 Non linear force callback. More...
 

Detailed Description

Contains module pchelms.