XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
Equilibrium Class Reference

#include <equil.hpp>

Collaboration diagram for Equilibrium:
Collaboration graph
[legend]

Public Member Functions

 Equilibrium (NLReader::NamelistReader &nlr, const MagneticEquilFiles::Ptr &equil_files, const View< Equil::XPoint *, HostType > &xpts, const RZPair &axis_in)
 
 Equilibrium (PsiOption psi_opt)
 
 Equilibrium ()
 
KOKKOS_INLINE_FUNCTION bool is_in_region_1_or_2 (double r, double z, double psi) const
 
KOKKOS_INLINE_FUNCTION bool is_in_region_1 (double r, double z, double psi) const
 
KOKKOS_INLINE_FUNCTION bool is_in_region_3b (double r, double z, double psi) const
 
KOKKOS_INLINE_FUNCTION void check_boundaries (const SimdVector2D &x, Simd< bool > &rz_outside) const
 
KOKKOS_INLINE_FUNCTION void get_theta (const SimdVector2D &x, Simd< double > &theta) const
 
void write (const DomainDecomposition< DeviceType > &pol_decomp, const View< double *, CLayout, HostType > &eq_psi_grid, const View< double *, CLayout, HostType > &eq_I, const View< double **, CLayout, HostType > &eq_psi_rz, double bt_sign, double bp_sign, bool is_3D, int periodicity=1, int eq_mp=1, const View< double **, CLayout, HostType > &eq_B_R_rz=View< double **, CLayout, HostType >(NoInit("eq_B_R_rz"), 0, 0), const View< double **, CLayout, HostType > &eq_B_Z_rz=View< double **, CLayout, HostType >(NoInit("eq_B_Z_rz"), 0, 0), const View< double **, CLayout, HostType > &eq_B_phi_rz=View< double **, CLayout, HostType >(NoInit("eq_B_phi_rz"), 0, 0), const View< double **, CLayout, HostType > &eq_VMEC_angle_rz=View< double **, CLayout, HostType >(NoInit("eq_VMEC_angle_rz"), 0, 0), const View< double **, CLayout, HostType > &eq_PEST_angle_rz=View< double **, CLayout, HostType >(NoInit("eq_PEST_angle_rz"), 0, 0))
 
void set_decay_factors (double out_decay_factor_in, double priv_flux_decay_factor_in, double out_decay_width_in, double priv_flux_decay_width_in, bool set_xpt2_in)
 

Public Attributes

RZBounds bounds
 Min and max for r and z. More...
 
double xpt_psi
 Psi coordinate of 1st X-point. More...
 
double psi_norm
 Psi value to use for normalization. More...
 
double epsil_psi = 1.0e-05
 Not sure? More...
 
RZPair xpt
 coordinates of 1st X-point More...
 
double xpt_slope
 Slope (which slope?) at 1st X-point. More...
 
bool set_xpt2
 Whether to use a 2nd X-point. More...
 
RZPair xpt2
 coordinates of 2nd X-point More...
 
double xpt2_slope
 Slope (which slope?) at 2nd X-point. More...
 
double xpt2_psi
 psi coordinate at 2nd X-point More...
 
RZPair axis
 coordinates of axis More...
 
double axis_b
 magnetic field magnitude on axis More...
 
double out_decay_factor
 profiles decay exponentially to f(sml_outpsi)/decay_factor for psi>sml_outpsi More...
 
double priv_flux_decay_factor
 profiles decay exponentially to f(sml_outpsi)/decay_factor in priv. flux region More...
 
double out_decay_width
 width for exponential decay for psi>sml_outpsi More...
 
double priv_flux_decay_width
 width for exponential decay in private flux region More...
 

Constructor & Destructor Documentation

Equilibrium::Equilibrium ( NLReader::NamelistReader nlr,
const MagneticEquilFiles::Ptr equil_files_ptr,
const View< Equil::XPoint *, HostType > &  xpts_in,
const RZPair axis_in 
)

Constructor for equilibrium class

Here is the call graph for this function:

Equilibrium::Equilibrium ( PsiOption  psi_opt)
inline
Equilibrium::Equilibrium ( )
inline

Member Function Documentation

KOKKOS_INLINE_FUNCTION void Equilibrium::check_boundaries ( const SimdVector2D x,
Simd< bool > &  rz_outside 
) const

Check whether vector of (r,z) locations is outside of the equilibrium

Parameters
[in]x{r,z} coordinates
[out]rz_outsideWhether they are outside or not

Here is the call graph for this function:

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void Equilibrium::get_theta ( const SimdVector2D x,
Simd< double > &  theta 
) const

Gets theta coordinate from {r,z} coordinates

Parameters
[in]x{r,z} coordinates
[out]thetaVector of theta values

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION bool Equilibrium::is_in_region_1 ( double  r,
double  z,
double  psi 
) const

Check whether a location is in region 1 of the tokamak

Parameters
[in]rr coordinate
[in]zz coordinate
[in]psipsi coordinate
Returns
True if the location is in region 1

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION bool Equilibrium::is_in_region_1_or_2 ( double  r,
double  z,
double  psi 
) const

Check whether a location is in region 1 or 2 of the tokamak

Parameters
[in]rr coordinate
[in]zz coordinate
[in]psipsi coordinate
Returns
True if the location is in region 1 or 2

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION bool Equilibrium::is_in_region_3b ( double  r,
double  z,
double  psi 
) const

Check whether a location is in the second private region

Parameters
[in]rr coordinate
[in]zz coordinate
[in]psipsi coordinate
Returns
True if the location is in second private region

Here is the caller graph for this function:

void Equilibrium::set_decay_factors ( double  out_decay_factor_in,
double  priv_flux_decay_factor_in,
double  out_decay_width_in,
double  priv_flux_decay_width_in,
bool  set_xpt2_in 
)

Assigns factors needed for eq profile calculations

void Equilibrium::write ( const DomainDecomposition< DeviceType > &  pol_decomp,
const View< double *, CLayout, HostType > &  eq_psi_grid,
const View< double *, CLayout, HostType > &  eq_I,
const View< double **, CLayout, HostType > &  eq_psi_rz,
double  bt_sign,
double  bp_sign,
bool  is_3D,
int  periodicity = 1,
int  eq_mp = 1,
const View< double **, CLayout, HostType > &  eq_B_R_rz = View<double**,CLayout,HostType>(NoInit("eq_B_R_rz"), 0, 0),
const View< double **, CLayout, HostType > &  eq_B_Z_rz = View<double**,CLayout,HostType>(NoInit("eq_B_Z_rz"), 0, 0),
const View< double **, CLayout, HostType > &  eq_B_phi_rz = View<double**,CLayout,HostType>(NoInit("eq_B_phi_rz"), 0, 0),
const View< double **, CLayout, HostType > &  eq_VMEC_angle_rz = View<double**,CLayout,HostType>(NoInit("eq_VMEC_angle_rz"), 0, 0),
const View< double **, CLayout, HostType > &  eq_PEST_angle_rz = View<double**,CLayout,HostType>(NoInit("eq_PEST_angle_rz"), 0, 0) 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

RZPair Equilibrium::axis

coordinates of axis

double Equilibrium::axis_b

magnetic field magnitude on axis

RZBounds Equilibrium::bounds

Min and max for r and z.

double Equilibrium::epsil_psi = 1.0e-05

Not sure?

double Equilibrium::out_decay_factor

profiles decay exponentially to f(sml_outpsi)/decay_factor for psi>sml_outpsi

double Equilibrium::out_decay_width

width for exponential decay for psi>sml_outpsi

double Equilibrium::priv_flux_decay_factor

profiles decay exponentially to f(sml_outpsi)/decay_factor in priv. flux region

double Equilibrium::priv_flux_decay_width

width for exponential decay in private flux region

double Equilibrium::psi_norm

Psi value to use for normalization.

bool Equilibrium::set_xpt2

Whether to use a 2nd X-point.

RZPair Equilibrium::xpt

coordinates of 1st X-point

RZPair Equilibrium::xpt2

coordinates of 2nd X-point

double Equilibrium::xpt2_psi

psi coordinate at 2nd X-point

double Equilibrium::xpt2_slope

Slope (which slope?) at 2nd X-point.

double Equilibrium::xpt_psi

Psi coordinate of 1st X-point.

double Equilibrium::xpt_slope

Slope (which slope?) at 1st X-point.


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