XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations | Functions
get_volume.cpp File Reference
#include <Kokkos_Random.hpp>
#include "rng_seed.hpp"
#include "globals.hpp"
#include "my_mpi.hpp"
#include "basic_physics.hpp"
#include "magnetic_field.hpp"
#include "grid.hpp"
#include "species.hpp"
#include "linear_weights.hpp"
#include "view_arithmetic.hpp"
#include "grid_node_tr_mapping.hpp"
#include "grid_field.hpp"
Include dependency graph for get_volume.cpp:

Enumerations

enum  NormBy { NormBy::Volume = 0, NormBy::Area }
 

Functions

long long int get_n_monte_carlo (double desired_volume_accuracy, double simulation_volume)
 
void get_tr_vol_and_area (const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, View< double *, CLayout, DeviceType > &tr_area, View< double *, CLayout, DeviceType > &tr_vol)
 
void analytical_area_and_volume (const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, const View< double *, CLayout, DeviceType > &tr_area, View< double *, CLayout, DeviceType > &node_area, View< double *, CLayout, DeviceType > &node_vol, View< double **, CLayout, DeviceType > &node_vol_ff, View< double *, CLayout, DeviceType > &node_vol_nearest)
 
template<NormBy T>
KOKKOS_INLINE_FUNCTION double r_norm (double rdim, double roffset, double rand)
 
template<>
KOKKOS_INLINE_FUNCTION double r_norm< NormBy::Volume > (double rdim, double roffset, double rand)
 
template<>
KOKKOS_INLINE_FUNCTION double r_norm< NormBy::Area > (double rdim, double roffset, double rand)
 
template<NormBy T_NormBy, typename F >
void monte_carlo_parallel_for (const RZBounds &rz_bounds, double phi_max, long long int n_monte_carlo, bool use_nonrandom_sampling, F func)
 
KOKKOS_INLINE_FUNCTION void monte_carlo_vol00 (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const SimdVector2D &x, const Simd< double > &psi, const View< double *, CLayout, DeviceType > &vol00)
 
KOKKOS_INLINE_FUNCTION void monte_carlo_diag_1d_vol (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const SimdVector2D &x, const View< double *, CLayout, DeviceType > &diag_1d_vol)
 
KOKKOS_INLINE_FUNCTION void monte_carlo_node_area (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const SimdVector &v, const View< double *, CLayout, DeviceType > &node_area)
 
KOKKOS_INLINE_FUNCTION void monte_carlo_node_vol (const Grid< DeviceType > &grid, const SimdGridWeights< Order::One, PhiInterpType::None > &grid_wts, const View< double *, CLayout, DeviceType > &node_vol)
 
KOKKOS_INLINE_FUNCTION void monte_carlo_node_vol_ff (const Grid< DeviceType > &grid, const SimdGridWeights< Order::One, PhiInterpType::Planes > &grid_wts, const Simd< double > &phi, const View< double **, CLayout, DeviceType > &node_vol_ff)
 
KOKKOS_INLINE_FUNCTION void monte_carlo_node_vol_nearest (const Grid< DeviceType > &grid, const SimdGridWeights< Order::Zero, PIT_GLOBAL > &grid_wts0, const View< double *, CLayout, DeviceType > &node_vol_nearest)
 
void monte_carlo_area (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, long long int n_monte_carlo, bool use_nonrandom_sampling, View< double *, CLayout, DeviceType > &node_area)
 
void monte_carlo_volume (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, long long int n_monte_carlo, bool use_nonrandom_sampling, View< double *, CLayout, DeviceType > &node_vol, View< double **, CLayout, DeviceType > &node_vol_ff, View< double *, CLayout, DeviceType > &node_vol_nearest, View< double *, CLayout, DeviceType > &vol00)
 
void get_node_volume (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, bool node_vol_monte, int n_monte_carlo, VolumesAndAreas &volumes_and_areas)
 

Enumeration Type Documentation

enum NormBy
strong
Enumerator
Volume 
Area 

Function Documentation

void analytical_area_and_volume ( const MagneticField< DeviceType > &  magnetic_field,
const Grid< DeviceType > &  grid,
const View< double *, CLayout, DeviceType > &  tr_area,
View< double *, CLayout, DeviceType > &  node_area,
View< double *, CLayout, DeviceType > &  node_vol,
View< double **, CLayout, DeviceType > &  node_vol_ff,
View< double *, CLayout, DeviceType > &  node_vol_nearest 
)

Here is the call graph for this function:

Here is the caller graph for this function:

long long int get_n_monte_carlo ( double  desired_volume_accuracy,
double  simulation_volume 
)
void get_node_volume ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
bool  node_vol_monte,
int  n_monte_carlo,
VolumesAndAreas volumes_and_areas 
)

Get volume arrays

Here is the call graph for this function:

Here is the caller graph for this function:

void get_tr_vol_and_area ( const MagneticField< DeviceType > &  magnetic_field,
const Grid< DeviceType > &  grid,
View< double *, CLayout, DeviceType > &  tr_area,
View< double *, CLayout, DeviceType > &  tr_vol 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void monte_carlo_area ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
long long int  n_monte_carlo,
bool  use_nonrandom_sampling,
View< double *, CLayout, DeviceType > &  node_area 
)

Get area array

Here is the call graph for this function:

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void monte_carlo_diag_1d_vol ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const SimdVector2D x,
const View< double *, CLayout, DeviceType > &  diag_1d_vol 
)

Here is the call graph for this function:

KOKKOS_INLINE_FUNCTION void monte_carlo_node_area ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const SimdVector v,
const View< double *, CLayout, DeviceType > &  node_area 
)

Here is the call graph for this function:

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void monte_carlo_node_vol ( const Grid< DeviceType > &  grid,
const SimdGridWeights< Order::One, PhiInterpType::None > &  grid_wts,
const View< double *, CLayout, DeviceType > &  node_vol 
)

Get volume arrays

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void monte_carlo_node_vol_ff ( const Grid< DeviceType > &  grid,
const SimdGridWeights< Order::One, PhiInterpType::Planes > &  grid_wts,
const Simd< double > &  phi,
const View< double **, CLayout, DeviceType > &  node_vol_ff 
)

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void monte_carlo_node_vol_nearest ( const Grid< DeviceType > &  grid,
const SimdGridWeights< Order::Zero, PIT_GLOBAL > &  grid_wts0,
const View< double *, CLayout, DeviceType > &  node_vol_nearest 
)

Here is the caller graph for this function:

template<NormBy T_NormBy, typename F >
void monte_carlo_parallel_for ( const RZBounds rz_bounds,
double  phi_max,
long long int  n_monte_carlo,
bool  use_nonrandom_sampling,
func 
)

Here is the call graph for this function:

KOKKOS_INLINE_FUNCTION void monte_carlo_vol00 ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const SimdVector2D x,
const Simd< double > &  psi,
const View< double *, CLayout, DeviceType > &  vol00 
)

Here is the call graph for this function:

void monte_carlo_volume ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
long long int  n_monte_carlo,
bool  use_nonrandom_sampling,
View< double *, CLayout, DeviceType > &  node_vol,
View< double **, CLayout, DeviceType > &  node_vol_ff,
View< double *, CLayout, DeviceType > &  node_vol_nearest,
View< double *, CLayout, DeviceType > &  vol00 
)

Get volume arrays

Here is the call graph for this function:

Here is the caller graph for this function:

template<NormBy T>
KOKKOS_INLINE_FUNCTION double r_norm ( double  rdim,
double  roffset,
double  rand 
)

Here is the caller graph for this function:

template<>
KOKKOS_INLINE_FUNCTION double r_norm< NormBy::Area > ( double  rdim,
double  roffset,
double  rand 
)
template<>
KOKKOS_INLINE_FUNCTION double r_norm< NormBy::Volume > ( double  rdim,
double  roffset,
double  rand 
)