|
ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
|
Wrapper for profile and geometry functions used by solver. More...
#include "profiles_wrapper.hpp"
Static Public Member Functions | |
| static Real | getB0 (Real s, Real chi) |
| Get magnetic field magnitude |B| at (s, chi) (Fortran: getB0 -> equil_absb). | |
| static void | getGeometry (Real s, Real chi, Real &jac, Real &g11, Real &g12, Real &g21, Real &g22, Real &B0) |
| Get geometry: Jacobian, metric tensor components, and |B| (Fortran: getGeometry). | |
| static void | getGeometry_cylinder (Real x, Real R, Real a, Real &jac, Real &g11, Real &g12, Real &g21, Real &g22, Real &B0, Real &Bz) |
| Cylinder geometry with q profile (Fortran: getGeometry_cylinder). | |
| static void | getGeometry_straightcylinder (Real x, Real &jac, Real &g11, Real &g12, Real &g21, Real &g22, Real &B0, Real &Bz) |
| Straight cylinder geometry (Fortran: getGeometry_straightcylinder). | |
| static Real | getJacobian (Real s, Real chi) |
| Get Jacobian J at (s, chi) (Fortran: getJacobian -> jacob). | |
| static Real | getJacobianDerivative (Real s, Real chi) |
| Get Jacobian derivative dJ/ds at (s, chi) (Fortran: getJacobianDerivative -> jacobDerivative). | |
| static void | getProfileGradients (Real s, int isp, Real &dTj0ds, Real &dNj0ds) |
| Get profile gradients dT/ds and dN/ds (Fortran: getProfileGradients). | |
| static void | getProfiles (Real s, Real chi, int isp, Real &Tj0, Real &Nj0) |
| Get temperature and density profiles (Fortran: getProfiles). | |
| static void | getProfiles_constant (Real &Tj0, Real &Nj0) |
| Get constant profiles: Tj0 = 1, Nj0 = 1 (Fortran: getProfiles_constant). | |
| static Real | getSafetyFactor (Real s) |
| Get safety factor q at radial position s (Fortran: getSafetyFactor -> qchi). | |
| static void | getSpecies (int isp, Real &qj, Real &mj) |
| Get species charge and mass (Fortran: getSpecies). | |
| static void | initSafetyFactor (const std::array< Real, 5 > &qsc_) |
| Initialize safety factor polynomial coefficients (Fortran: initSafetyFactor). | |
| static Real | safetyFactor (Real x, Real a) |
| Evaluate safety factor polynomial q(x/a) (Fortran: safetyFactor). | |
Wrapper for profile and geometry functions used by solver.
Provides interface to equilibrium and species data. C++ port of Fortran module profilesWrapper (profilesWrapper.F90).
Species indexing convention: All public functions take isp as a 1-based species index, matching the Fortran calling convention (isp = 1 for first species). Internally, isp is passed unchanged to Equil functions (which also expect 1-based), and converted to 0-based isp0 = isp - 1 once at function entry for C++ container access (std::vector, Kokkos::View).
Get magnetic field magnitude |B| at (s, chi) (Fortran: getB0 -> equil_absb).
|
static |
Get geometry: Jacobian, metric tensor components, and |B| (Fortran: getGeometry).
|
static |
Cylinder geometry with q profile (Fortran: getGeometry_cylinder).
|
static |
Straight cylinder geometry (Fortran: getGeometry_straightcylinder).
Get Jacobian J at (s, chi) (Fortran: getJacobian -> jacob).
Get Jacobian derivative dJ/ds at (s, chi) (Fortran: getJacobianDerivative -> jacobDerivative).
|
static |
Get profile gradients dT/ds and dN/ds (Fortran: getProfileGradients).
| s | Normalized radial coordinate. | |
| isp | Species index (1-based, Fortran convention) | |
| [out] | dTj0ds | Radial temperature derivative. |
| [out] | dNj0ds | Radial density derivative. |
|
static |
Get temperature and density profiles (Fortran: getProfiles).
| s | Normalized radial coordinate. | |
| chi | Straight-field-line poloidal angle in radians. | |
| isp | Species index (1-based, Fortran convention) | |
| [out] | Tj0 | Equilibrium temperature in normalized units. |
| [out] | Nj0 | Equilibrium number density in normalized units. |
Get constant profiles: Tj0 = 1, Nj0 = 1 (Fortran: getProfiles_constant).
Get safety factor q at radial position s (Fortran: getSafetyFactor -> qchi).
Get species charge and mass (Fortran: getSpecies).
| isp | Species index (1-based, Fortran convention) | |
| [out] | qj | Species charge in ORB5X normalized units. |
| [out] | mj | Species mass in ORB5X normalized units. |
|
static |
Initialize safety factor polynomial coefficients (Fortran: initSafetyFactor).
Evaluate safety factor polynomial q(x/a) (Fortran: safetyFactor).