48 Psip(
double R0,
double a,
double b): m_R0(R0), m_a(a), m_b(b) { }
51 return 1. - (R-m_R0)*(R-m_R0)/m_a/m_a - Z*Z/m_b/m_b;
54 double m_R0, m_a, m_b;
63 PsipR(
double R0,
double a): m_R0(R0), m_a(a) { }
66 return -2*(R-m_R0)/m_a/m_a;
static CylindricalFunctorsLvl2 createPsip(double R0, double a, double b)
gives ellipsoid flux surfaces
Definition: toroidal.h:91
static dg::geo::TokamakMagneticField createCircularField(double R0, double I0, double a=1, double b=1)
Definition: toroidal.h:136
static CylindricalFunctorsLvl1 createIpol(double I0)
constant
Definition: toroidal.h:100
@ toroidal
dg::geo::createToroidalField
@ circular
dg::geo::circular::Psip
@ none
no shaping: Purely toroidal magnetic field
@ standardO
closed flux surfaces centered around an O-point located near (R_0, 0); flux-aligned grids can be cons...
static dg::geo::TokamakMagneticField createToroidalField(double R0)
Create a Toroidal Magnetic field.
Definition: toroidal.h:118
static CylindricalFunctorsLvl1 createIpol()
constant
Definition: toroidal.h:24
static CylindricalFunctorsLvl2 createPsip()
constant
Definition: toroidal.h:15
Definition: fluxfunctions.h:114
This struct bundles a function and its first derivatives.
Definition: fluxfunctions.h:182
This struct bundles a function and its first and second derivatives.
Definition: fluxfunctions.h:219
Meta-data about the magnetic field in particular the flux function.
Definition: magnetic_field.h:91
A tokamak field as given by R0, Psi and Ipol plus Meta-data like shape and equilibrium.
Definition: magnetic_field.h:162
Represent functions written in cylindrical coordinates that are independent of the angle phi serving ...
Definition: fluxfunctions.h:66
Definition: toroidal.h:42
double do_compute(double R, double Z) const
Definition: toroidal.h:49
Psip(double R0, double a, double b)
Construct from major radius.
Definition: toroidal.h:48
Definition: toroidal.h:58
PsipR(double R0, double a)
Construct from major radius.
Definition: toroidal.h:63
double do_compute(double R, double Z) const
Definition: toroidal.h:64
Definition: toroidal.h:73
PsipZ(double b)
Definition: toroidal.h:74
double do_compute(double R, double Z) const
Definition: toroidal.h:75