Graph Framework
Loading...
Searching...
No Matches
equilibrium::vmec< T, SAFE_MATH > Class Template Referencefinal

3D VMEC equilibrium. More...

#include <equilibrium.hpp>

Inheritance diagram for equilibrium::vmec< T, SAFE_MATH >:
equilibrium::generic< T, SAFE_MATH >

Public Member Functions

 vmec (const T sminh, const T sminf, const T ds, graph::shared_leaf< T, SAFE_MATH > dphi, graph::shared_leaf< T, SAFE_MATH > signj, const backend::buffer< T > chi_c0, const backend::buffer< T > chi_c1, const backend::buffer< T > chi_c2, const backend::buffer< T > chi_c3, const std::vector< backend::buffer< T > > rmnc_c0, const std::vector< backend::buffer< T > > rmnc_c1, const std::vector< backend::buffer< T > > rmnc_c2, const std::vector< backend::buffer< T > > rmnc_c3, const std::vector< backend::buffer< T > > zmns_c0, const std::vector< backend::buffer< T > > zmns_c1, const std::vector< backend::buffer< T > > zmns_c2, const std::vector< backend::buffer< T > > zmns_c3, const std::vector< backend::buffer< T > > lmns_c0, const std::vector< backend::buffer< T > > lmns_c1, const std::vector< backend::buffer< T > > lmns_c2, const std::vector< backend::buffer< T > > lmns_c3, const backend::buffer< T > xm, const backend::buffer< T > xn)
 Construct a EFIT equilibrium.
 
virtual graph::shared_vector< T, SAFE_MATH > get_esup1 (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the contravariant basis vector in the S direction.
 
virtual graph::shared_vector< T, SAFE_MATH > get_esup2 (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the contravariant basis vector in the U direction.
 
virtual graph::shared_vector< T, SAFE_MATH > get_esup3 (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the contravariant basis vector in the V direction.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_electron_density (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the electron density.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_ion_density (const size_t index, graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the ion density.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_electron_temperature (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the electron temperature.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_ion_temperature (const size_t index, graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the ion temperature.
 
virtual graph::shared_vector< T, SAFE_MATH > get_magnetic_field (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the magnetic field.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_characteristic_field (const size_t device_number=0) final
 Get the characteristic field.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_x (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the x position.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_y (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the y position.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_z (graph::shared_leaf< T, SAFE_MATH > s, graph::shared_leaf< T, SAFE_MATH > u, graph::shared_leaf< T, SAFE_MATH > v)
 Get the z position.
 
- Public Member Functions inherited from equilibrium::generic< T, SAFE_MATH >
 generic (const std::vector< T > &masses, const std::vector< uint8_t > &charges)
 Construct a generic equilibrum.
 
virtual ~generic ()
 Destructor.
 
size_t get_num_ion_species () const
 Get the number of ion species.
 
get_ion_mass (const size_t index) const
 Get the mass for an ion species.
 
uint8_t get_ion_charge (const size_t index) const
 Get the charge for an ion species.
 

Additional Inherited Members

- Protected Attributes inherited from equilibrium::generic< T, SAFE_MATH >
const std::vector< T > ion_masses
 Ion masses for each species.
 
const std::vector< uint8_t > ion_charges
 Ion charge for each species.
 

Detailed Description

template<jit::float_scalar T, bool SAFE_MATH = false>
class equilibrium::vmec< T, SAFE_MATH >

3D VMEC equilibrium.

This takes a Cublic spline interpolations of the vmec quantities.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.

Constructor & Destructor Documentation

◆ vmec()

template<jit::float_scalar T, bool SAFE_MATH = false>
equilibrium::vmec< T, SAFE_MATH >::vmec ( const T  sminh,
const T  sminf,
const T  ds,
graph::shared_leaf< T, SAFE_MATH >  dphi,
graph::shared_leaf< T, SAFE_MATH >  signj,
const backend::buffer< T >  chi_c0,
const backend::buffer< T >  chi_c1,
const backend::buffer< T >  chi_c2,
const backend::buffer< T >  chi_c3,
const std::vector< backend::buffer< T > >  rmnc_c0,
const std::vector< backend::buffer< T > >  rmnc_c1,
const std::vector< backend::buffer< T > >  rmnc_c2,
const std::vector< backend::buffer< T > >  rmnc_c3,
const std::vector< backend::buffer< T > >  zmns_c0,
const std::vector< backend::buffer< T > >  zmns_c1,
const std::vector< backend::buffer< T > >  zmns_c2,
const std::vector< backend::buffer< T > >  zmns_c3,
const std::vector< backend::buffer< T > >  lmns_c0,
const std::vector< backend::buffer< T > >  lmns_c1,
const std::vector< backend::buffer< T > >  lmns_c2,
const std::vector< backend::buffer< T > >  lmns_c3,
const backend::buffer< T >  xm,
const backend::buffer< T >  xn 
)
inline

Construct a EFIT equilibrium.

Parameters
[in]sminhMinimum s on the half grid.
[in]sminfMinimum s on the full grid.
[in]dsChange in s grid.
[in]dphiChange in torodial flux.
[in]signjSign of the jacobian.
[in]chi_c0Poloidal flux c0.
[in]chi_c1Poloidal flux c1.
[in]chi_c2Poloidal flux c2.
[in]chi_c3Poloidal flux c3.
[in]rmnc_c0rmnc c0.
[in]rmnc_c1rmnc c1.
[in]rmnc_c2rmnc c2.
[in]rmnc_c3rmnc c3.
[in]zmns_c0zmns c0.
[in]zmns_c1zmns c1.
[in]zmns_c2zmns c2.
[in]zmns_c3zmns c3.
[in]lmns_c0lmns c0.
[in]lmns_c1lmns c1.
[in]lmns_c2lmns c2.
[in]lmns_c3lmns c3.
[in]xmPoloidal mode numbers.
[in]xnToroidal mode numbers.

Member Function Documentation

◆ get_characteristic_field()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_characteristic_field ( const size_t  device_number = 0)
inlinefinalvirtual

Get the characteristic field.

Use the value at the y intercept.

Parameters
[in]device_numberDevice to use.
Returns
The characteristic field.

Implements equilibrium::generic< T, SAFE_MATH >.

◆ get_electron_density()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_electron_density ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the electron density.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The electron density expression.

Implements equilibrium::generic< T, SAFE_MATH >.

◆ get_electron_temperature()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_electron_temperature ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the electron temperature.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The electron temperature expression.

Implements equilibrium::generic< T, SAFE_MATH >.

◆ get_esup1()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_esup1 ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the contravariant basis vector in the S direction.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The contravaraiant basis vector in s.

Reimplemented from equilibrium::generic< T, SAFE_MATH >.

◆ get_esup2()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_esup2 ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the contravariant basis vector in the U direction.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The contravaraiant basis vector in u.

Reimplemented from equilibrium::generic< T, SAFE_MATH >.

◆ get_esup3()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_esup3 ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the contravariant basis vector in the V direction.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The contravaraiant basis vector in v.

Reimplemented from equilibrium::generic< T, SAFE_MATH >.

◆ get_ion_density()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_ion_density ( const size_t  index,
graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the ion density.

Parameters
[in]indexThe species index.
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The ion density expression.

Implements equilibrium::generic< T, SAFE_MATH >.

◆ get_ion_temperature()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_ion_temperature ( const size_t  index,
graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the ion temperature.

Parameters
[in]indexThe species index.
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The ion temperature expression.

Implements equilibrium::generic< T, SAFE_MATH >.

◆ get_magnetic_field()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_magnetic_field ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the magnetic field.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
Magnetic field expression.

Implements equilibrium::generic< T, SAFE_MATH >.

◆ get_x()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_x ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the x position.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The x position.

Reimplemented from equilibrium::generic< T, SAFE_MATH >.

◆ get_y()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_y ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the y position.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The y position.

Reimplemented from equilibrium::generic< T, SAFE_MATH >.

◆ get_z()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >::get_z ( graph::shared_leaf< T, SAFE_MATH >  s,
graph::shared_leaf< T, SAFE_MATH >  u,
graph::shared_leaf< T, SAFE_MATH >  v 
)
inlinevirtual

Get the z position.

Parameters
[in]sS posiiton.
[in]uU position.
[in]vV position.
Returns
The z position.

Reimplemented from equilibrium::generic< T, SAFE_MATH >.


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