Extension: Geometries
#include "dg/geometries/geometries.h"

Constructs and display geometric parameters for the polynomial fields. More...

Public Member Functions

 Parameters (const dg::file::WrappedJsonValue &js)
 Construct from Json dataset. More...
 
Json::Value dump () const
 Put values into a json string. More...
 
bool isToroidal () const
 True if pp==0. More...
 
void display (std::ostream &os=std::cout) const
 Write variables as a formatted string. More...
 

Public Attributes

double R_0
 major tokamak radius More...
 
double pp
 prefactor for Psi_p More...
 
double pi
 prefactor for current I More...
 
double a
 little tokamak radius More...
 
double elongation
 elongation of the magnetic surfaces More...
 
double triangularity
 triangularity of the magnetic surfaces More...
 
unsigned M
 number of coefficients in R More...
 
unsigned N
 number of coefficients in Z More...
 
std::vector< double > c
 M*N coefficients for the polynomial equilibrium, c[i*N+j] corresponds to R^i Z^j;. More...
 
std::string description
 

Detailed Description

Constructs and display geometric parameters for the polynomial fields.

Note
include json/json.h before geometries.h in order to activate json functionality

Constructor & Destructor Documentation

◆ Parameters()

dg::geo::polynomial::Parameters::Parameters ( const dg::file::WrappedJsonValue &  js)
inline

Construct from Json dataset.

// Polynomial geometry parameters
{
"equilibrium" : "polynomial",
"M" : 8,
"N" : 8,
"PI" : -1.0,
"PP" : -1.0,
"R_0" : 906.38,
"c" :
[
-0.96689843290517163,
3.0863312163153722,
// ... M*N coefficients in total
],
"description" : "standardX",
"elongation" : 1.5,
"inverseaspectratio" : 0.27593818984547458,
"triangularity" : 0.40000000000000002
}
See also
dg::geo::description to see valid values for the description field
Parameters
jsvalid Json object (see code above to see the valid key : value pairs)
Note
the default values in brackets are taken if the variables are not found in the input file
Attention
This Constructor is only defined if json/json.h is included before dg/geometries/geometries.h

Member Function Documentation

◆ display()

void dg::geo::polynomial::Parameters::display ( std::ostream &  os = std::cout) const
inline

Write variables as a formatted string.

◆ dump()

Json::Value dg::geo::polynomial::Parameters::dump ( ) const
inline

Put values into a json string.

Returns
Json value
Attention
This member is only defined if json/json.h is included before dg/geometries/geometries.h

◆ isToroidal()

bool dg::geo::polynomial::Parameters::isToroidal ( ) const
inline

True if pp==0.

Returns
true if the flux function is a constant

Member Data Documentation

◆ a

double dg::geo::polynomial::Parameters::a

little tokamak radius

◆ c

std::vector<double> dg::geo::polynomial::Parameters::c

M*N coefficients for the polynomial equilibrium, c[i*N+j] corresponds to R^i Z^j;.

◆ description

std::string dg::geo::polynomial::Parameters::description

◆ elongation

double dg::geo::polynomial::Parameters::elongation

elongation of the magnetic surfaces

◆ M

unsigned dg::geo::polynomial::Parameters::M

number of coefficients in R

◆ N

unsigned dg::geo::polynomial::Parameters::N

number of coefficients in Z

◆ pi

double dg::geo::polynomial::Parameters::pi

prefactor for current I

◆ pp

double dg::geo::polynomial::Parameters::pp

prefactor for Psi_p

◆ R_0

double dg::geo::polynomial::Parameters::R_0

major tokamak radius

◆ triangularity

double dg::geo::polynomial::Parameters::triangularity

triangularity of the magnetic surfaces


The documentation for this struct was generated from the following file: