SPEC 3.20
Stepped Pressure Equilibrium Code
File List
Here is a list of all documented files with brief descriptions:
[detail level 12]
  src
 basefn.f90Polynomials evaluation
 bfield.f90Returns \(\dot s \equiv B^s / B^\zeta\) and \(\dot \theta \equiv B^\theta / B^\zeta\)
 bnorml.f90Computes \({\bf B}_{Plasma} \cdot {\bf e}_\theta \times {\bf e}_\zeta \;\) on the computational boundary, \(\partial {\cal D}\)
 brcast.f90Broadcasts Beltrami fields, profiles, . .
 casing.f90Constructs the field created by the plasma currents, at an arbitrary, external location using virtual casing
 coords.f90Calculates coordinates, \({\bf x}(s,\theta,\zeta) \equiv R \, {\bf e}_R + Z \, {\bf e}_Z\), and metrics, using FFTs
 curent.f90Computes the plasma current, \(I \equiv \int B_\theta \, d\theta\), and the "linking" current, \(G \equiv \int B_\zeta \, d\zeta\)
 df00ab.f90Evaluates volume integrals, and their derivatives w.r.t. interface geometry, using "packed" format
 dforce.f90Calculates \({\bf F}({\bf x})\), where \({\bf x} \equiv \{\mbox{geometry}\} \equiv \{ R_{i,v}, Z_{i,v}\}\) and \({\bf F}\equiv[[p+B^2/2]] + \{\mbox{spectral constraints}\} \), and \(\nabla {\bf F}\)
 dfp100.f90Split the work between MPI nodes and evaluate the global constraint
 dfp200.f90Given the field consistent with the constraints and the geometry, computes local quantites related to the force evaluation
 global.f90Defines input namelists and global variables, and opens some output files
 hesian.f90Computes eigenvalues and eigenvectors of derivative matrix, \(\nabla_{\bf xi}{\bf F}\)
 inputlist.f90Input namelists
 intghs.f90Calculates volume integrals of Chebyshev-polynomials and covariant field for Hessian computation
 jo00aa.f90Measures error in Beltrami equation, \(\nabla \times {\bf B} - \mu {\bf B}\)
 lforce.f90Computes \(B^2\), and the spectral condensation constraints if required, on the interfaces, \({\cal I}_i\)
 ma00aa.f90Calculates volume integrals of Chebyshev polynomials and metric element products
 ma02aa.f90Constructs Beltrami field in given volume consistent with flux, helicity, rotational-transform and/or parallel-current constraints
 matrix.f90Constructs energy and helicity matrices that represent the Beltrami linear system
 memory.f90Memory management module
 metrix.f90Calculates the metric quantities, \(\sqrt g \, g^{\mu\nu}\), which are required for the energy and helicity integrals
 mp00ac.f90Solves Beltrami/vacuum (linear) system, given matrices
 mtrxhs.f90Constructs matrices that represent the Beltrami linear system, matrix-free
 newton.f90Employs Newton method to find \({\bf F}({\bf x})=0\), where \({\bf x}\equiv\{\mathrm{geometry}\}\) and \({\bf F}\) is defined in dforce()
 packab.f90Packs, and unpacks, Beltrami field solution vector; \({\bf a}\equiv\{A_{\theta,e,i,l}, A_{\zeta,e,i,l}, \mathrm{etc.}\}\)
 packxi.f90Packs, and unpacks, geometrical degrees of freedom; and sets coordinate axis
 pc00aa.f90Use preconditioned conjugate gradient method to find minimum of energy functional
 pc00ab.f90Returns the energy functional and it's derivatives with respect to geometry
 pp00aa.f90Constructs PoincarĂ© plot and "approximate" rotational-transform (driver)
 pp00ab.f90Follows magnetic fieldline using ode-integration routine from rksuite.f
 preset.f90Allocates and initializes internal arrays
 ra00aa.f90Writes vector potential to .ext.sp.A
 rzaxis.f90The coordinate axis is assigned via a poloidal average over an arbitrary surface
 sphdf5.f90Writes all the output information to ext.sp.h5
 spsint.f90Calculates volume integrals of Chebyshev-polynomials and metric elements for preconditioner
 spsmat.f90Constructs matrices for the precondtioner
 stzxyz.f90Calculates coordinates, \({\bf x}(s,\theta,\zeta) \equiv R \, {\bf e}_R + Z \, {\bf e}_Z\), and metrics, at given \((s,\theta,\zeta)\)
 tr00ab.f90Calculates rotational transform given an arbitrary tangential field
 volume.f90Computes volume of each region; and, if required, the derivatives of the volume with respect to the interface geometry
 wa00aa.f90Constructs smooth approximation to wall
 xspech.f90Main program