SPEC 3.20
Stepped Pressure Equilibrium Code
Metric quantities

Functions/Subroutines

subroutine metrix (lquad, lvol)
 Calculates the metric quantities, \(\sqrt g \, g^{\mu\nu}\), which are required for the energy and helicity integrals. More...
 

Detailed Description

Function/Subroutine Documentation

◆ metrix()

subroutine metrix ( integer, intent(in)  lquad,
integer, intent(in)  lvol 
)

Calculates the metric quantities, \(\sqrt g \, g^{\mu\nu}\), which are required for the energy and helicity integrals.

metrics

  • The Jacobian, \(\sqrt g\), and the "lower" metric elements, \(g_{\mu\nu}\), are calculated by coords(), and are provided on a regular grid in "real-space", i.e. \((\theta,\zeta)\), at a given radial location, i.e. where \(s\) is input.

plasma region

  • In the plasma region, the required terms are \(\bar g_{\mu\nu} \equiv g_{\mu\nu}/\sqrt g\).

    \begin{eqnarray} \begin{array}{ccccccccccccccccccccccccc} \sqrt g \; g^{s s } & = & \left( g_{\theta\theta} g_{\zeta \zeta } - g_{\theta\zeta } g_{\theta\zeta } \right) / \sqrt g \\ \sqrt g \; g^{s \theta} & = & \left( g_{\theta\zeta } g_{s \zeta } - g_{s \theta} g_{\zeta \zeta } \right) / \sqrt g \\ \sqrt g \; g^{s \zeta } & = & \left( g_{s \theta} g_{\theta\zeta } - g_{\theta\theta} g_{s \zeta } \right) / \sqrt g \\ \sqrt g \; g^{\theta\theta} & = & \left( g_{\zeta \zeta } g_{s s } - g_{s \zeta } g_{s \zeta } \right) / \sqrt g \\ \sqrt g \; g^{\theta\zeta } & = & \left( g_{s \zeta } g_{s \theta} - g_{\theta\zeta } g_{s s } \right) / \sqrt g \\ \sqrt g \; g^{\zeta \zeta } & = & \left( g_{s s } g_{\theta\theta} - g_{s \theta} g_{s \theta} \right) / \sqrt g \end{array} \end{eqnarray}

FFTs

  • After constructing the required quantities in real space, FFTs provided the required Fourier harmonics, which are returned through global.f90 . (The "extended" Fourier resolution is used.)

References allglobal::cfmn, allglobal::cpus, allglobal::dbdx, allglobal::efmn, allglobal::goomne, allglobal::goomno, allglobal::gssmne, allglobal::gssmno, allglobal::gstmne, allglobal::gstmno, allglobal::gszmne, allglobal::gszmno, allglobal::gttmne, allglobal::gttmno, allglobal::gtzmne, allglobal::gtzmno, allglobal::guvij, allglobal::guvijsave, allglobal::gvuij, allglobal::gzzmne, allglobal::gzzmno, allglobal::ijreal, allglobal::im, allglobal::ime, allglobal::in, allglobal::ine, metrix(), allglobal::mn, allglobal::mne, allglobal::myid, allglobal::ncpu, allglobal::nt, allglobal::ntz, allglobal::nz, allglobal::ofmn, constants::one, fileunits::ounit, allglobal::sfmn, allglobal::sg, numerical::small, and constants::zero.

Referenced by ma00aa(), and metrix().

Here is the call graph for this function:
Here is the caller graph for this function: