Stellarator-Tools
vmec_quantities Class Reference

Vmec quantities. More...

#include <vmec_quantities.hpp>

Public Member Functions

 vmec_quantities (const std::string &wout_file)
 Vmec 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_dbsupu_du (const double s, const double u, const double v) const
 Get dbsupudu quantity. More...
 
double get_dbsupv_dv (const double s, const double u, const double v) const
 Get dbsupvdv 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
 Get pressure quantity. More...
 
double get_test (const double s) const
 Get test quantity. More...
 

Static Public Member Functions

static vmec_grid< full_gridmake_full ()
 Factory method to make a test quantity. More...
 
template<typename TYPE >
static double load_scalar (const std::string &wout_file, const std::string &name)
 Factory method to load a scalar vmec quantity. More...
 
template<class GIRD_CLASS >
static vmec_grid< GIRD_CLASS > load (const std::string &wout_file, const std::string &name)
 Factory method to load a vmec quantity. More...
 
template<class GIRD_CLASS , class PARITY >
static vmec_fourier< GIRD_CLASS, PARITY > load_fourier (const std::string &wout_file, const std::string &name)
 Factory method to load a fourier vmec quantity. More...
 
template<class GIRD_CLASS , class PARITY >
static vmec_fourier< GIRD_CLASS, PARITY > load_fourier_nyq (const std::string &wout_file, const std::string &name)
 Factory method to load a nyquest fourier vmec quantity. More...
 
template<class PARITY >
static vmec_fourier< half_grid, PARITY > to_prime (const vmec_fourier< full_grid, PARITY > vmec)
 Convert full grid quantity to half grid primed. More...
 
template<class PARITY >
static vmec_fourier< full_grid, PARITY > to_prime (const vmec_fourier< half_grid, PARITY > vmec)
 Convert full grid quantity to half grid primed. More...
 

Public Attributes

const vmec_grid< full_gridtest_full
 test function
 
const vmec_fourier< full_grid, cosiner
 r
 
const vmec_fourier< half_grid, cosinedrds
 drds
 
const vmec_fourier< full_grid, sinez
 z
 
const vmec_fourier< half_grid, sinedzds
 dzds
 
const vmec_grid< full_gridphipf
 Radial derivative of toroidal flux.
 
const vmec_grid< full_gridchipf
 Radial derivative of poloidal flux.
 
const double signj
 Sign of vmec jacobian.
 
const vmec_fourier< half_grid, cosinej
 Jacobian.
 
const vmec_fourier< half_grid, cosinebsupu
 B^u.
 
const vmec_fourier< half_grid, cosinebsupv
 B^v.
 
const vmec_fourier< half_grid, sinebsubs
 B_s.
 
const vmec_fourier< half_grid, cosinebsubu
 B_u.
 
const vmec_fourier< half_grid, cosinebsubv
 B_v.
 
const vmec_fourier< full_grid, cosinejksupu
 JK^u.
 
const vmec_fourier< full_grid, cosinejksupv
 JK^v.
 
const double curtor
 Total toroidal current.
 
const vmec_grid< full_gridp
 Pressure.
 

Detailed Description

Vmec quantities.

Class representing a quantities from vmec.

Constructor & Destructor Documentation

◆ vmec_quantities()

vmec_quantities::vmec_quantities ( const std::string &  wout_file)
inline

Vmec quantities.

For now this only supports symmetric cases only.

Parameters
[in]wout_fileFile name of a vmec wout file.

Member Function Documentation

◆ get_bsubs()

double vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_quantities::get_chipf ( const double  s) const
inline

Get chipf quantity.

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

◆ get_curtor()

double vmec_quantities::get_curtor ( ) const
inline

Get total toroidal current.

Returns
The total toroidal current.

◆ get_dbsupu_du()

double vmec_quantities::get_dbsupu_du ( const double  s,
const double  u,
const double  v 
) const
inline

Get dbsupudu quantity.

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

◆ get_dbsupv_dv()

double vmec_quantities::get_dbsupv_dv ( const double  s,
const double  u,
const double  v 
) const
inline

Get dbsupvdv quantity.

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

◆ get_divb()

double vmec_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_dr_du()

double vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_quantities::get_phipf ( const double  s) const
inline

Get phipf quantity.

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

◆ get_pressure()

double vmec_quantities::get_pressure ( const double  s) const
inline

Get pressure quantity.

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

◆ get_r()

double vmec_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 vmec_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 vmec_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 vmec_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 vmec_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 vmec_grid<GIRD_CLASS> vmec_quantities::load ( const std::string &  wout_file,
const std::string &  name 
)
inlinestatic

Factory method to load a vmec quantity.

Parameters
[in]wout_fileFile name of a vmec wout file.
[in]nameName of the quantity to load.
Returns
A constructed vmec grid quantity.

◆ load_fourier()

template<class GIRD_CLASS , class PARITY >
static vmec_fourier<GIRD_CLASS, PARITY> vmec_quantities::load_fourier ( const std::string &  wout_file,
const std::string &  name 
)
inlinestatic

Factory method to load a fourier vmec quantity.

Parameters
[in]wout_fileFile name of a vmec wout file.
[in]nameName of the quantity to load.
Returns
A constructed vmec fourier quantity.

◆ load_fourier_nyq()

template<class GIRD_CLASS , class PARITY >
static vmec_fourier<GIRD_CLASS, PARITY> vmec_quantities::load_fourier_nyq ( const std::string &  wout_file,
const std::string &  name 
)
inlinestatic

Factory method to load a nyquest fourier vmec quantity.

Parameters
[in]wout_fileFile name of a vmec wout file.
[in]nameName of the nyquest quantity to load.
Returns
A constructed vmec nyquest fourier quantity.

◆ load_scalar()

template<typename TYPE >
static double vmec_quantities::load_scalar ( const std::string &  wout_file,
const std::string &  name 
)
inlinestatic

Factory method to load a scalar vmec quantity.

Parameters
[in]wout_fileFile name of a vmec wout file.
[in]nameName of the quantity to load.
Returns
A constructed scalar quantity.

◆ make_full()

static vmec_grid<full_grid> vmec_quantities::make_full ( )
inlinestatic

Factory method to make a test quantity.

Returns
A constructed test quantity.

◆ to_prime() [1/2]

template<class PARITY >
static vmec_fourier<half_grid, PARITY> vmec_quantities::to_prime ( const vmec_fourier< full_grid, PARITY >  vmec)
inlinestatic

Convert full grid quantity to half grid primed.

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

◆ to_prime() [2/2]

template<class PARITY >
static vmec_fourier<full_grid, PARITY> vmec_quantities::to_prime ( const vmec_fourier< half_grid, PARITY >  vmec)
inlinestatic

Convert full grid quantity to half grid primed.

Parameters
[in]vmecA full grid vmec quantity to take the derivative of.
Returns
A full grid derivative.

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