SPEC 3.20
Stepped Pressure Equilibrium Code
src Directory Reference

Files

file  basefn.f90
 Polynomials evaluation.
 
file  bfield.f90
 Returns \(\dot s \equiv B^s / B^\zeta\) and \(\dot \theta \equiv B^\theta / B^\zeta\).
 
file  bnorml.f90
 Computes \({\bf B}_{Plasma} \cdot {\bf e}_\theta \times {\bf e}_\zeta \;\) on the computational boundary, \(\partial {\cal D}\).
 
file  brcast.f90
 Broadcasts Beltrami fields, profiles, . . .
 
file  casing.f90
 Constructs the field created by the plasma currents, at an arbitrary, external location using virtual casing.
 
file  coords.f90
 Calculates coordinates, \({\bf x}(s,\theta,\zeta) \equiv R \, {\bf e}_R + Z \, {\bf e}_Z\), and metrics, using FFTs.
 
file  curent.f90
 Computes the plasma current, \(I \equiv \int B_\theta \, d\theta\), and the "linking" current, \(G \equiv \int B_\zeta \, d\zeta\).
 
file  df00ab.f90
 Evaluates volume integrals, and their derivatives w.r.t. interface geometry, using "packed" format.
 
file  dforce.f90
 Calculates \({\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}\).
 
file  dfp100.f90
 Split the work between MPI nodes and evaluate the global constraint.
 
file  dfp200.f90
 Given the field consistent with the constraints and the geometry, computes local quantites related to the force evaluation.
 
file  global.f90
 Defines input namelists and global variables, and opens some output files.
 
file  hesian.f90
 Computes eigenvalues and eigenvectors of derivative matrix, \(\nabla_{\bf xi}{\bf F}\).
 
file  inputlist.f90
 Input namelists.
 
file  intghs.f90
 Calculates volume integrals of Chebyshev-polynomials and covariant field for Hessian computation.
 
file  jo00aa.f90
 Measures error in Beltrami equation, \(\nabla \times {\bf B} - \mu {\bf B}\).
 
file  lforce.f90
 Computes \(B^2\), and the spectral condensation constraints if required, on the interfaces, \({\cal I}_i\).
 
file  ma00aa.f90
 Calculates volume integrals of Chebyshev polynomials and metric element products.
 
file  ma02aa.f90
 Constructs Beltrami field in given volume consistent with flux, helicity, rotational-transform and/or parallel-current constraints.
 
file  matrix.f90
 Constructs energy and helicity matrices that represent the Beltrami linear system.
 
file  memory.f90
 memory management module
 
file  metrix.f90
 Calculates the metric quantities, \(\sqrt g \, g^{\mu\nu}\), which are required for the energy and helicity integrals.
 
file  mp00ac.f90
 Solves Beltrami/vacuum (linear) system, given matrices.
 
file  mtrxhs.f90
 Constructs matrices that represent the Beltrami linear system, matrix-free.
 
file  newton.f90
 Employs Newton method to find \({\bf F}({\bf x})=0\), where \({\bf x}\equiv\{\mathrm{geometry}\}\) and \({\bf F}\) is defined in dforce() .
 
file  packab.f90
 Packs, and unpacks, Beltrami field solution vector; \({\bf a}\equiv\{A_{\theta,e,i,l}, A_{\zeta,e,i,l}, \mathrm{etc.}\}\).
 
file  packxi.f90
 Packs, and unpacks, geometrical degrees of freedom; and sets coordinate axis.
 
file  pc00aa.f90
 Use preconditioned conjugate gradient method to find minimum of energy functional.
 
file  pc00ab.f90
 Returns the energy functional and it's derivatives with respect to geometry.
 
file  pp00aa.f90
 Constructs PoincarĂ© plot and "approximate" rotational-transform (driver).
 
file  pp00ab.f90
 Follows magnetic fieldline using ode-integration routine from rksuite.f .
 
file  preset.f90
 Allocates and initializes internal arrays.
 
file  ra00aa.f90
 Writes vector potential to .ext.sp.A .
 
file  rzaxis.f90
 The coordinate axis is assigned via a poloidal average over an arbitrary surface.
 
file  sphdf5.f90
 Writes all the output information to ext.sp.h5.
 
file  spsint.f90
 Calculates volume integrals of Chebyshev-polynomials and metric elements for preconditioner.
 
file  spsmat.f90
 Constructs matrices for the precondtioner.
 
file  stzxyz.f90
 Calculates coordinates, \({\bf x}(s,\theta,\zeta) \equiv R \, {\bf e}_R + Z \, {\bf e}_Z\), and metrics, at given \((s,\theta,\zeta)\).
 
file  tr00ab.f90
 Calculates rotational transform given an arbitrary tangential field.
 
file  volume.f90
 Computes volume of each region; and, if required, the derivatives of the volume with respect to the interface geometry.
 
file  wa00aa.f90
 Constructs smooth approximation to wall.
 
file  xspech.f90
 Main program.