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

Class representing a generic equilibrium. More...

#include <equilibrium.hpp>

Inheritance diagram for equilibrium::generic< T, SAFE_MATH >:
equilibrium::efit< T, SAFE_MATH > equilibrium::guassian_density< T, SAFE_MATH > equilibrium::no_magnetic_field< T, SAFE_MATH > equilibrium::slab< T, SAFE_MATH > equilibrium::slab_density< T, SAFE_MATH > equilibrium::slab_field< T, SAFE_MATH > equilibrium::vmec< T, SAFE_MATH >

Public Member Functions

 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.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_electron_density (graph::shared_leaf< T, SAFE_MATH > x, graph::shared_leaf< T, SAFE_MATH > y, graph::shared_leaf< T, SAFE_MATH > z)=0
 Get the electron density.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_ion_density (const size_t index, graph::shared_leaf< T, SAFE_MATH > x, graph::shared_leaf< T, SAFE_MATH > y, graph::shared_leaf< T, SAFE_MATH > z)=0
 Get the ion density.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_electron_temperature (graph::shared_leaf< T, SAFE_MATH > x, graph::shared_leaf< T, SAFE_MATH > y, graph::shared_leaf< T, SAFE_MATH > z)=0
 Get the electron temperature.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_ion_temperature (const size_t index, graph::shared_leaf< T, SAFE_MATH > x, graph::shared_leaf< T, SAFE_MATH > y, graph::shared_leaf< T, SAFE_MATH > z)=0
 Get the ion temperature.
 
virtual graph::shared_vector< T, SAFE_MATH > get_magnetic_field (graph::shared_leaf< T, SAFE_MATH > x, graph::shared_leaf< T, SAFE_MATH > y, graph::shared_leaf< T, SAFE_MATH > z)=0
 Get the magnetic field.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_characteristic_field (const size_t device_number=0)=0
 Get the characteristic field.
 
virtual graph::shared_vector< T, SAFE_MATH > get_esup1 (graph::shared_leaf< T, SAFE_MATH > x1, graph::shared_leaf< T, SAFE_MATH > x2, graph::shared_leaf< T, SAFE_MATH > x3)
 Get the contravariant basis vector in the x1 direction.
 
virtual graph::shared_vector< T, SAFE_MATH > get_esup2 (graph::shared_leaf< T, SAFE_MATH > x1, graph::shared_leaf< T, SAFE_MATH > x2, graph::shared_leaf< T, SAFE_MATH > x3)
 Get the contravariant basis vector in the x2 direction.
 
virtual graph::shared_vector< T, SAFE_MATH > get_esup3 (graph::shared_leaf< T, SAFE_MATH > x1, graph::shared_leaf< T, SAFE_MATH > x2, graph::shared_leaf< T, SAFE_MATH > x3)
 Get the contravariant basis vector in the x3 direction.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_x (graph::shared_leaf< T, SAFE_MATH > x1, graph::shared_leaf< T, SAFE_MATH > x2, graph::shared_leaf< T, SAFE_MATH > x3)
 Get the x position.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_y (graph::shared_leaf< T, SAFE_MATH > x1, graph::shared_leaf< T, SAFE_MATH > x2, graph::shared_leaf< T, SAFE_MATH > x3)
 Get the y position.
 
virtual graph::shared_leaf< T, SAFE_MATH > get_z (graph::shared_leaf< T, SAFE_MATH > x1, graph::shared_leaf< T, SAFE_MATH > x2, graph::shared_leaf< T, SAFE_MATH > x3)
 Get the z position.
 

Protected Attributes

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::generic< T, SAFE_MATH >

Class representing a generic equilibrium.

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

Constructor & Destructor Documentation

◆ generic()

template<jit::float_scalar T, bool SAFE_MATH = false>
equilibrium::generic< T, SAFE_MATH >::generic ( const std::vector< T > &  masses,
const std::vector< uint8_t > &  charges 
)
inline

Construct a generic equilibrum.

Parameters
[in]massesVector of ion masses.
[in]chargesVector of ion charges.

Member Function Documentation

◆ get_characteristic_field()

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

Get the characteristic field.

The characteristic field is equilibrium dependent.

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

Implemented in equilibrium::no_magnetic_field< T, SAFE_MATH >, equilibrium::slab< T, SAFE_MATH >, equilibrium::slab_density< T, SAFE_MATH >, equilibrium::slab_field< T, SAFE_MATH >, equilibrium::guassian_density< T, SAFE_MATH >, equilibrium::efit< T, SAFE_MATH >, and equilibrium::vmec< T, SAFE_MATH >.

◆ get_electron_density()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_electron_density ( graph::shared_leaf< T, SAFE_MATH >  x,
graph::shared_leaf< T, SAFE_MATH >  y,
graph::shared_leaf< T, SAFE_MATH >  z 
)
pure virtual

◆ get_electron_temperature()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_electron_temperature ( graph::shared_leaf< T, SAFE_MATH >  x,
graph::shared_leaf< T, SAFE_MATH >  y,
graph::shared_leaf< T, SAFE_MATH >  z 
)
pure virtual

◆ get_esup1()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_esup1 ( graph::shared_leaf< T, SAFE_MATH >  x1,
graph::shared_leaf< T, SAFE_MATH >  x2,
graph::shared_leaf< T, SAFE_MATH >  x3 
)
inlinevirtual

Get the contravariant basis vector in the x1 direction.

Parameters
[in]x1X1 posiiton.
[in]x2X2 position.
[in]x3X3 position.
Returns
The contravaraiant basis vector in x1.

Reimplemented in equilibrium::vmec< T, SAFE_MATH >.

◆ get_esup2()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_esup2 ( graph::shared_leaf< T, SAFE_MATH >  x1,
graph::shared_leaf< T, SAFE_MATH >  x2,
graph::shared_leaf< T, SAFE_MATH >  x3 
)
inlinevirtual

Get the contravariant basis vector in the x2 direction.

Parameters
[in]x1X1 posiiton.
[in]x2X2 position.
[in]x3X3 position.
Returns
The contravaraiant basis vector in x2.

Reimplemented in equilibrium::vmec< T, SAFE_MATH >.

◆ get_esup3()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_esup3 ( graph::shared_leaf< T, SAFE_MATH >  x1,
graph::shared_leaf< T, SAFE_MATH >  x2,
graph::shared_leaf< T, SAFE_MATH >  x3 
)
inlinevirtual

Get the contravariant basis vector in the x3 direction.

Parameters
[in]x1X1 posiiton.
[in]x2X2 position.
[in]x3X3 position.
Returns
The contravaraiant basis vector in x3.

Reimplemented in equilibrium::vmec< T, SAFE_MATH >.

◆ get_ion_charge()

template<jit::float_scalar T, bool SAFE_MATH = false>
uint8_t equilibrium::generic< T, SAFE_MATH >::get_ion_charge ( const size_t  index) const
inline

Get the charge for an ion species.

Parameters
[in]indexThe species index.
Returns
The number of ion species.

◆ get_ion_density()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_ion_density ( const size_t  index,
graph::shared_leaf< T, SAFE_MATH >  x,
graph::shared_leaf< T, SAFE_MATH >  y,
graph::shared_leaf< T, SAFE_MATH >  z 
)
pure virtual

Get the ion density.

Parameters
[in]indexThe species index.
[in]xX position.
[in]yY position.
[in]zZ position.
Returns
The ion density expression.

Implemented in equilibrium::vmec< T, SAFE_MATH >, equilibrium::efit< T, SAFE_MATH >, equilibrium::no_magnetic_field< T, SAFE_MATH >, equilibrium::slab< T, SAFE_MATH >, equilibrium::slab_density< T, SAFE_MATH >, equilibrium::slab_field< T, SAFE_MATH >, and equilibrium::guassian_density< T, SAFE_MATH >.

◆ get_ion_mass()

template<jit::float_scalar T, bool SAFE_MATH = false>
T equilibrium::generic< T, SAFE_MATH >::get_ion_mass ( const size_t  index) const
inline

Get the mass for an ion species.

Parameters
[in]indexThe species index.
Returns
The mass for the ion at the index.

◆ get_ion_temperature()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_ion_temperature ( const size_t  index,
graph::shared_leaf< T, SAFE_MATH >  x,
graph::shared_leaf< T, SAFE_MATH >  y,
graph::shared_leaf< T, SAFE_MATH >  z 
)
pure virtual

Get the ion temperature.

Parameters
[in]indexThe species index.
[in]xX position.
[in]yY position.
[in]zZ position.
Returns
The ion temperature expression.

Implemented in equilibrium::vmec< T, SAFE_MATH >, equilibrium::efit< T, SAFE_MATH >, equilibrium::no_magnetic_field< T, SAFE_MATH >, equilibrium::slab< T, SAFE_MATH >, equilibrium::slab_density< T, SAFE_MATH >, equilibrium::slab_field< T, SAFE_MATH >, and equilibrium::guassian_density< T, SAFE_MATH >.

◆ get_magnetic_field()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_vector< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_magnetic_field ( graph::shared_leaf< T, SAFE_MATH >  x,
graph::shared_leaf< T, SAFE_MATH >  y,
graph::shared_leaf< T, SAFE_MATH >  z 
)
pure virtual

◆ get_num_ion_species()

template<jit::float_scalar T, bool SAFE_MATH = false>
size_t equilibrium::generic< T, SAFE_MATH >::get_num_ion_species ( ) const
inline

Get the number of ion species.

Returns
The number of ion species.

◆ get_x()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_x ( graph::shared_leaf< T, SAFE_MATH >  x1,
graph::shared_leaf< T, SAFE_MATH >  x2,
graph::shared_leaf< T, SAFE_MATH >  x3 
)
inlinevirtual

Get the x position.

Parameters
[in]x1X1 posiiton.
[in]x2X2 position.
[in]x3X3 position.
Returns
The x position.

Reimplemented in equilibrium::vmec< T, SAFE_MATH >.

◆ get_y()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_y ( graph::shared_leaf< T, SAFE_MATH >  x1,
graph::shared_leaf< T, SAFE_MATH >  x2,
graph::shared_leaf< T, SAFE_MATH >  x3 
)
inlinevirtual

Get the y position.

Parameters
[in]x1X1 posiiton.
[in]x2X2 position.
[in]x3X3 position.
Returns
The y position.

Reimplemented in equilibrium::vmec< T, SAFE_MATH >.

◆ get_z()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual graph::shared_leaf< T, SAFE_MATH > equilibrium::generic< T, SAFE_MATH >::get_z ( graph::shared_leaf< T, SAFE_MATH >  x1,
graph::shared_leaf< T, SAFE_MATH >  x2,
graph::shared_leaf< T, SAFE_MATH >  x3 
)
inlinevirtual

Get the z position.

Parameters
[in]x1X1 posiiton.
[in]x2X2 position.
[in]x3X3 position.
Returns
The z position.

Reimplemented in equilibrium::vmec< T, SAFE_MATH >.


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