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;
CylindricalFunctorsLvl1 createIpol(double I0)
constant
Definition toroidal.h:100
CylindricalFunctorsLvl2 createPsip(double R0, double a, double b)
gives ellipsoid flux surfaces
Definition toroidal.h:91
dg::geo::TokamakMagneticField createCircularField(double R0, double I0, double a=1, double b=1)
Definition toroidal.h:136
@ 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...
dg::geo::TokamakMagneticField createToroidalField(double R0)
Create a Toroidal Magnetic field.
Definition toroidal.h:118
CylindricalFunctorsLvl2 createPsip()
constant
Definition toroidal.h:15
CylindricalFunctorsLvl1 createIpol()
constant
Definition toroidal.h:24
Definition fluxfunctions.h:114
This struct bundles a function and its first derivatives.
Definition fluxfunctions.h:186
This struct bundles a function and its first and second derivatives.
Definition fluxfunctions.h:223
Meta-data about the magnetic field in particular the flux function.
Definition magnetic_field.h:94
A tokamak field as given by R0, Psi and Ipol plus Meta-data like shape and equilibrium.
Definition magnetic_field.h:165
Represent functions written in cylindrical coordinates that are independent of the angle phi serving ...
Definition fluxfunctions.h:66
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
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
PsipZ(double b)
Definition toroidal.h:74
double do_compute(double R, double Z) const
Definition toroidal.h:75