XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
ff_projection_setup.cpp File Reference
#include "grid.hpp"
#include "grid_node_tr_mapping.hpp"
#include "particles.hpp"
#include "xgc_io.hpp"
#include "my_subview.hpp"
#include "ff_projection_setup.hpp"
Include dependency graph for ff_projection_setup.cpp:

Functions

void set_ff_pointers (int nnode, double *ff_hdp_p, int *ff_hdp_tr, double *ff_hdp_dx, double *ff_1dp_p, int *ff_1dp_tr, double *ff_1dp_dx)
 
KOKKOS_INLINE_FUNCTION void use_nearest_triangle (const Grid< DeviceType > &grid, const View< int **, CLayout, DeviceType > &tr_node, const SimdVector2D &x, bool weight_p_on_boundary, int i_simd, Simd< int > &itr, SimdGridVec &p_loc)
 
void initialize_on_device (const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const View< int **, CLayout, DeviceType > &tr_node, int iseg_offset, int nseg, bool weight_p_on_boundary, View< int **, CLayout, DeviceType > &hdp_tr_d, View< double ***, CLayout, DeviceType > &hdp_p_d, View< double **, CLayout, DeviceType > &hdp_dx_d, View< int **, CLayout, DeviceType > &odp_tr_d, View< double ***, CLayout, DeviceType > &odp_p_d, View< double **, CLayout, DeviceType > &odp_dx_d)
 
void ff_projection_setup (NLReader::NamelistReader &nlr, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, Projection< HostType > &half_plane_ff, Projection< HostType > &one_plane_ff)
 
static void write_ff (const Grid< HostType > &grid, const Projection< HostType > &projection, const std::string stream_name, const std::string filename, bool reverse)
 
void ff_write_projections_to_file (const Grid< HostType > &grid)
 
void check_ff_property (const Projection< HostType > &projection, const std::string label)
 

Function Documentation

void check_ff_property ( const Projection< HostType > &  projection,
const std::string  label 
)

Here is the caller graph for this function:

void ff_projection_setup ( NLReader::NamelistReader nlr,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
Projection< HostType > &  half_plane_ff,
Projection< HostType > &  one_plane_ff 
)

Initialize the field-aligned mapping between adjacent planes. The routine traces magnetic field lines from each vertex of a plane in both toroidal directions to the adjacent mid-planes and full-step planes, records the triangle in which the field line intersects these planes and the corresponding interpolation weights.

Parameters
[in]gridXGC grid object, type(grid_type)
[out]psnXGC field data object, type(psn_type)

< zero out p for non-exist field following position.

Here is the call graph for this function:

Here is the caller graph for this function:

void ff_write_projections_to_file ( const Grid< HostType > &  grid)

Here is the call graph for this function:

Here is the caller graph for this function:

void initialize_on_device ( const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const View< int **, CLayout, DeviceType > &  tr_node,
int  iseg_offset,
int  nseg,
bool  weight_p_on_boundary,
View< int **, CLayout, DeviceType > &  hdp_tr_d,
View< double ***, CLayout, DeviceType > &  hdp_p_d,
View< double **, CLayout, DeviceType > &  hdp_dx_d,
View< int **, CLayout, DeviceType > &  odp_tr_d,
View< double ***, CLayout, DeviceType > &  odp_p_d,
View< double **, CLayout, DeviceType > &  odp_dx_d 
)

Initialize the field-aligned mapping between adjacent planes. The routine traces magnetic field lines from each vertex of a plane in both toroidal directions to the adjacent mid-planes and full-step planes, records the triangle in which the field line intersects these planes and the corresponding interpolation weights.

Parameters
[in]gridXGC grid object, type(grid_type)
[out]psnXGC field data object, type(psn_type)

Here is the call graph for this function:

Here is the caller graph for this function:

void set_ff_pointers ( int  nnode,
double *  ff_hdp_p,
int *  ff_hdp_tr,
double *  ff_hdp_dx,
double *  ff_1dp_p,
int *  ff_1dp_tr,
double *  ff_1dp_dx 
)

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void use_nearest_triangle ( const Grid< DeviceType > &  grid,
const View< int **, CLayout, DeviceType > &  tr_node,
const SimdVector2D x,
bool  weight_p_on_boundary,
int  i_simd,
Simd< int > &  itr,
SimdGridVec p_loc 
)

Find the nearest triangle and use it. This algorithm loops over ALL nodes - very inefficient! Should use wall nodes - or last surface if no wall is present

Here is the call graph for this function:

Here is the caller graph for this function:

static void write_ff ( const Grid< HostType > &  grid,
const Projection< HostType > &  projection,
const std::string  stream_name,
const std::string  filename,
bool  reverse 
)
static

Here is the call graph for this function:

Here is the caller graph for this function: