Stellarator-Tools
siesta_quantities Class Reference

Siesta quantities. More...

#include <siesta_quantities.hpp>

Public Member Functions

 siesta_quantities (const std::string &restart_file)
 Siesta quantities. More...
 
double get_r (const double s, const double u, const double v) const
 Get R quantity. More...
 
double get_r_prime (const double s, const double u, const double v) const
 Get R' quantity. More...
 
double get_dr_du (const double s, const double u, const double v) const
 Get dRdu quantity. More...
 
double get_dr_dv (const double s, const double u, const double v) const
 Get dRdv quantity. More...
 
double get_z (const double s, const double u, const double v) const
 Get Z quantity. More...
 
double get_z_prime (const double s, const double u, const double v) const
 Get Z' quantity. More...
 
double get_dz_du (const double s, const double u, const double v) const
 Get dZdu quantity. More...
 
double get_dz_dv (const double s, const double u, const double v) const
 Get dZdv quantity. More...
 
double get_phipf (const double s) const
 Get phipf quantity. More...
 
double get_chipf (const double s) const
 Get chipf quantity. More...
 
double get_bsups (const double s, const double u, const double v) const
 Get bsups quantity. More...
 
double get_bsupu (const double s, const double u, const double v) const
 Get bsupu quantity. More...
 
double get_bsupv (const double s, const double u, const double v) const
 Get bsupv quantity. More...
 
double get_bsubs (const double s, const double u, const double v) const
 Get bsubs quantity. More...
 
double get_bsubu (const double s, const double u, const double v) const
 Get bsubu quantity. More...
 
double get_bsubv (const double s, const double u, const double v) const
 Get bsubv quantity. More...
 
double get_jksups (const double s, const double u, const double v) const
 Get jksups quantity. More...
 
double get_jksupu (const double s, const double u, const double v) const
 Get jksupu quantity. More...
 
double get_jksupv (const double s, const double u, const double v) const
 Get jksupv quantity. More...
 
double get_jbsups (const double s, const double u, const double v) const
 Get jbsups quantity. More...
 
double get_jbsupu (const double s, const double u, const double v) const
 Get jbsupu quantity. More...
 
double get_jbsupv (const double s, const double u, const double v) const
 Get jbsupv quantity. More...
 
double get_jacobian (const double s, const double u, const double v) const
 Get jacobian. More...
 
double get_curtor () const
 Get total toroidal current. More...
 
double get_djbsups_ds (const double s, const double u, const double v) const
 Get djbsupsds quantity. More...
 
double get_djbsupu_du (const double s, const double u, const double v) const
 Get djbsupudu quantity. More...
 
double get_djbsupv_dv (const double s, const double u, const double v) const
 Get djbsupvdv quantity. More...
 
double get_divb (const double s, const double u, const double v) const
 Get divergence of B. More...
 
double get_pressure (const double s, const double u, const double v) const
 Get pressure. More...
 
double get_test (const double s) const
 Get test quantity. More...
 

Static Public Member Functions

static siesta_grid< full_gridmake_full ()
 Factory method to make a test quantity. More...
 
template<class GIRD_CLASS >
static siesta_grid< GIRD_CLASS > load (const std::string &restart_file, const std::string &name)
 Factory method to load a siesta quantity. More...
 
static double load_scalar (const std::string &restart_file, const std::string &name)
 Factory method to load a scalar siesta quantity. More...
 
template<class GIRD_CLASS , class PARITY >
static siesta_fourier< GIRD_CLASS, PARITY > load_fourier (const std::string &restart_file, const std::string &name)
 Factory method to load a fourier siesta quantity. More...
 
template<class GIRD_CLASS , class PARITY >
static siesta_fourier< GIRD_CLASS, PARITY > load_fourier_denorm (const std::string &restart_file, const std::string &name)
 Factory method to load a fourier denormalized siesta quantity. More...
 
template<class PARITY >
static siesta_fourier< half_grid, PARITY > to_prime (const siesta_fourier< full_grid, PARITY > siesta)
 Convert full grid quantity to half grid primed. More...
 
template<class PARITY >
static siesta_fourier< full_grid, PARITY > to_prime (const siesta_fourier< half_grid, PARITY > siesta)
 Convert full grid quantity to half grid primed. More...
 

Public Attributes

const siesta_grid< full_gridtest_full
 test function
 
const siesta_fourier< full_grid, cosiner
 r
 
const siesta_fourier< half_grid, cosinedrds
 drds
 
const siesta_fourier< full_grid, sinez
 z
 
const siesta_fourier< half_grid, sinedzds
 dzds
 
const siesta_grid< full_gridphipf
 Radial derivative of toroidal flux.
 
const siesta_grid< full_gridchipf
 Radial derivative of poloidal flux.
 
const siesta_fourier< half_grid, sinejbsups
 JB^s.
 
const siesta_fourier< full_grid, sinedjbsupsds
 dJB^sds
 
const siesta_fourier< half_grid, cosinejbsupu
 JB^u.
 
const siesta_fourier< half_grid, cosinejbsupv
 JB^v.
 
const siesta_fourier< half_grid, sinebsups
 JB^s.
 
const siesta_fourier< half_grid, cosinebsupu
 JB^u.
 
const siesta_fourier< half_grid, cosinebsupv
 JB^v.
 
const siesta_fourier< half_grid, sinebsubs
 B_s.
 
const siesta_fourier< half_grid, cosinebsubu
 B_u.
 
const siesta_fourier< half_grid, cosinebsubv
 B_v.
 
const siesta_fourier< full_grid, sinejksups
 JK^s.
 
const siesta_fourier< full_grid, cosinejksupu
 JK^u.
 
const siesta_fourier< full_grid, cosinejksupv
 JK^v.
 
const double curtor
 Total toroidal current.
 
const siesta_fourier< half_grid, cosinep
 Pressure.
 

Detailed Description

Siesta quantities.

Class representing a quantities from siesta.

Constructor & Destructor Documentation

◆ siesta_quantities()

siesta_quantities::siesta_quantities ( const std::string &  restart_file)
inline

Siesta quantities.

For now this only supports symmetric cases only.

Parameters
[in]restart_fileFile name of a restart file.

Member Function Documentation

◆ get_bsubs()

double siesta_quantities::get_bsubs ( const double  s,
const double  u,
const double  v 
) const
inline

Get bsubs quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
bsubs at the s,u,v position.

◆ get_bsubu()

double siesta_quantities::get_bsubu ( const double  s,
const double  u,
const double  v 
) const
inline

Get bsubu quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
bsubu at the s,u,v position.

◆ get_bsubv()

double siesta_quantities::get_bsubv ( const double  s,
const double  u,
const double  v 
) const
inline

Get bsubv quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
bsubv at the s,u,v position.

◆ get_bsups()

double siesta_quantities::get_bsups ( const double  s,
const double  u,
const double  v 
) const
inline

Get bsups quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
bsups at the s,u,v position.

◆ get_bsupu()

double siesta_quantities::get_bsupu ( const double  s,
const double  u,
const double  v 
) const
inline

Get bsupu quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
bsupu at the s,u,v position.

◆ get_bsupv()

double siesta_quantities::get_bsupv ( const double  s,
const double  u,
const double  v 
) const
inline

Get bsupv quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
bsupv at the s,u,v position.

◆ get_chipf()

double siesta_quantities::get_chipf ( const double  s) const
inline

Get chipf quantity.

Parameters
[in]sRadial position.
Returns
chipf at the s position.

◆ get_curtor()

double siesta_quantities::get_curtor ( ) const
inline

Get total toroidal current.

Returns
The total toroidal current.

◆ get_divb()

double siesta_quantities::get_divb ( const double  s,
const double  u,
const double  v 
) const
inline

Get divergence of B.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
Div B at the s,u,v position.

◆ get_djbsups_ds()

double siesta_quantities::get_djbsups_ds ( const double  s,
const double  u,
const double  v 
) const
inline

Get djbsupsds quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
djbsupsds at the s,u,v position.

◆ get_djbsupu_du()

double siesta_quantities::get_djbsupu_du ( const double  s,
const double  u,
const double  v 
) const
inline

Get djbsupudu quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
djbsupudu at the s,u,v position.

◆ get_djbsupv_dv()

double siesta_quantities::get_djbsupv_dv ( const double  s,
const double  u,
const double  v 
) const
inline

Get djbsupvdv quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
djbsupvdv at the s,u,v position.

◆ get_dr_du()

double siesta_quantities::get_dr_du ( const double  s,
const double  u,
const double  v 
) const
inline

Get dRdu quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
dRdu at the s,u,v position.

◆ get_dr_dv()

double siesta_quantities::get_dr_dv ( const double  s,
const double  u,
const double  v 
) const
inline

Get dRdv quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
dRdv at the s,u,v position.

◆ get_dz_du()

double siesta_quantities::get_dz_du ( const double  s,
const double  u,
const double  v 
) const
inline

Get dZdu quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
dZdu at the s,u,v position.

◆ get_dz_dv()

double siesta_quantities::get_dz_dv ( const double  s,
const double  u,
const double  v 
) const
inline

Get dZdv quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
dZdv at the s,u,v position.

◆ get_jacobian()

double siesta_quantities::get_jacobian ( const double  s,
const double  u,
const double  v 
) const
inline

Get jacobian.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
jacobian at the s,u,v position.

◆ get_jbsups()

double siesta_quantities::get_jbsups ( const double  s,
const double  u,
const double  v 
) const
inline

Get jbsups quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
jbsups at the s,u,v position.

◆ get_jbsupu()

double siesta_quantities::get_jbsupu ( const double  s,
const double  u,
const double  v 
) const
inline

Get jbsupu quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
jbsupu at the s,u,v position.

◆ get_jbsupv()

double siesta_quantities::get_jbsupv ( const double  s,
const double  u,
const double  v 
) const
inline

Get jbsupv quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
jbsupv at the s,u,v position.

◆ get_jksups()

double siesta_quantities::get_jksups ( const double  s,
const double  u,
const double  v 
) const
inline

Get jksups quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
jksups at the s,u,v position.

◆ get_jksupu()

double siesta_quantities::get_jksupu ( const double  s,
const double  u,
const double  v 
) const
inline

Get jksupu quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
jksupu at the s,u,v position.

◆ get_jksupv()

double siesta_quantities::get_jksupv ( const double  s,
const double  u,
const double  v 
) const
inline

Get jksupv quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
jksupv at the s,u,v position.

◆ get_phipf()

double siesta_quantities::get_phipf ( const double  s) const
inline

Get phipf quantity.

Parameters
[in]sRadial position.
Returns
phipf at the s position.

◆ get_pressure()

double siesta_quantities::get_pressure ( const double  s,
const double  u,
const double  v 
) const
inline

Get pressure.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
Pressure at the s,u,v position.

◆ get_r()

double siesta_quantities::get_r ( const double  s,
const double  u,
const double  v 
) const
inline

Get R quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
R at the s,u,v position.

◆ get_r_prime()

double siesta_quantities::get_r_prime ( const double  s,
const double  u,
const double  v 
) const
inline

Get R' quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
R' at the s,u,v position.

◆ get_test()

double siesta_quantities::get_test ( const double  s) const
inline

Get test quantity.

Parameters
[in]sRadial position.
Returns
Test value at the s position.

◆ get_z()

double siesta_quantities::get_z ( const double  s,
const double  u,
const double  v 
) const
inline

Get Z quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
Z at the s,u,v position.

◆ get_z_prime()

double siesta_quantities::get_z_prime ( const double  s,
const double  u,
const double  v 
) const
inline

Get Z' quantity.

Parameters
[in]sRadial position.
[in]uRadial position.
[in]vRadial position.
Returns
R' at the s,u,v position.

◆ load()

template<class GIRD_CLASS >
static siesta_grid<GIRD_CLASS> siesta_quantities::load ( const std::string &  restart_file,
const std::string &  name 
)
inlinestatic

Factory method to load a siesta quantity.

Parameters
[in]restart_fileFile name of a siesta restart file.
[in]nameName of the quantity to load.
Returns
A constructed siesta grid quantity.

◆ load_fourier()

template<class GIRD_CLASS , class PARITY >
static siesta_fourier<GIRD_CLASS, PARITY> siesta_quantities::load_fourier ( const std::string &  restart_file,
const std::string &  name 
)
inlinestatic

Factory method to load a fourier siesta quantity.

Parameters
[in]restart_fileFile name of a siesta restart file.
[in]nameName of the quantity to load.
Returns
A constructed siesta fourier quantity.

◆ load_fourier_denorm()

template<class GIRD_CLASS , class PARITY >
static siesta_fourier<GIRD_CLASS, PARITY> siesta_quantities::load_fourier_denorm ( const std::string &  restart_file,
const std::string &  name 
)
inlinestatic

Factory method to load a fourier denormalized siesta quantity.

Parameters
[in]restart_fileFile name of a siesta restart file.
[in]nameName of the quantity to load.
Returns
A constructed denormalized siesta fourier quantity.

◆ load_scalar()

static double siesta_quantities::load_scalar ( const std::string &  restart_file,
const std::string &  name 
)
inlinestatic

Factory method to load a scalar siesta quantity.

Parameters
[in]restart_fileFile name of a siesta restart file.
[in]nameName of the quantity to load.
Returns
A constructed scalar quantity.

◆ make_full()

static siesta_grid<full_grid> siesta_quantities::make_full ( )
inlinestatic

Factory method to make a test quantity.

Returns
A constructed test quantity.

◆ to_prime() [1/2]

template<class PARITY >
static siesta_fourier<half_grid, PARITY> siesta_quantities::to_prime ( const siesta_fourier< full_grid, PARITY >  siesta)
inlinestatic

Convert full grid quantity to half grid primed.

Parameters
[in]siestaA full grid siesta quantity to take the derivative of.
Returns
A half grid derivative.

◆ to_prime() [2/2]

template<class PARITY >
static siesta_fourier<full_grid, PARITY> siesta_quantities::to_prime ( const siesta_fourier< half_grid, PARITY >  siesta)
inlinestatic

Convert full grid quantity to half grid primed.

Parameters
[in]siestaA full grid siesta quantity to take the derivative of.
Returns
A full grid derivative.

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