XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions
get_potential_grad.cpp File Reference
#include "timer_macro.hpp"
#include "my_subview.hpp"
#include "sml.hpp"
#include "gradparx2.hpp"
#include "field_following_coordinates.hpp"
#include "matrix.hpp"
#include "gradient_matrices.hpp"
#include "get_potential_grad.hpp"
Include dependency graph for get_potential_grad.cpp:

Classes

struct  GetPotentialGradTempViews< Device, VT, PIT >
 

Functions

int * get_psn_ff_1dp_tr_loc ()
 
double * get_psn_ff_1dp_p_loc ()
 
double * get_psn_ff_1dp_dx_loc ()
 
rtypeget_psn_pbd0_2_iseg_loc ()
 
int get_psn_pbd0_2_nseg ()
 
void get_field_Ah_cv_ff (Field< VarType::Scalar, PhiInterpType::Planes > *psn_Ah_cv_ff)
 
void get_pot_epar_em_filter (double *tmp, double *E_para_em)
 
void get_gyro_avg_mat_data (int ind, int *m, int *n, int *w, int *nnz, int *is_csr_int, int **csr_ridx_or_eindex, int **csr_cidx_or_nelement, double **values)
 
template<VarType VT, PhiInterpType PIT>
void get_pot_convert_to_ff (const Grid< DeviceType > &grid, FieldFollowingCoordinates &ff, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, bool convert_00_field)
 
template<VarType VT, PhiInterpType PIT>
void broadcast_potentials (const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, bool calculate_E_para_em, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp)
 
template<VarType VT, PhiInterpType PIT>
void transpose_and_set_vector_field (const Grid< DeviceType > &grid, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, GridField< VT, PIT > &dfield)
 
template<VarType VT, PhiInterpType PIT>
void transpose_and_set_scalar_field (const Grid< DeviceType > &grid, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, const Kokkos::View< double ***, Kokkos::LayoutRight, DeviceType > &tmp_field, GridField< VarType::Scalar, PIT > &field)
 
template<VarType VT, PhiInterpType PIT>
void get_E00 (GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, Kokkos::View< Field< VarType::Vector2D, PIT > *, Kokkos::LayoutRight, HostType > &E00_ff_h)
 
template<VarType VT, PhiInterpType PIT>
void get_pot_grad (const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const ElectricField< DeviceType > &electric_field, const GradientMatrices< DeviceType > &grad_matrices, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, bool calculate_E)
 
template<VarType VT, PhiInterpType PIT>
void get_pot_epar (const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, FieldFollowingCoordinates &ff, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, bool calculate_E_para_em)
 
template<VarType VT, PhiInterpType PIT>
void assign_to_tmp (GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp)
 
template<VarType VT, PhiInterpType PIT>
void get_pot_mat_mult (const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, const std::vector< Matrix< DeviceType >> &gyro_avg_matrices, bool calculate_E_para_em)
 
template<typename FieldT , VarType VT, PhiInterpType PIT>
void get_field_grad (const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field, ElectricField< DeviceType > &electric_field, const GradientMatrices< DeviceType > &grad_matrices, FieldFollowingCoordinates &ff, std::vector< Matrix< DeviceType >> &gyro_avg_matrices, FieldT &psn_field, GetPotentialGradTempViews< DeviceType, VT, PIT > &tmp, GridField< VarType::Scalar, PIT > &field, GridField< VT, PIT > &dfield, bool calculate_E, bool do_get_E00)
 
void get_potential_grad (const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field, ElectricField< DeviceType > &electric_field)
 

Function Documentation

template<VarType VT, PhiInterpType PIT>
void assign_to_tmp ( GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp)

Here is the call graph for this function:

Here is the caller graph for this function:

template<VarType VT, PhiInterpType PIT>
void broadcast_potentials ( const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
bool  calculate_E_para_em,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<VarType VT, PhiInterpType PIT>
void get_E00 ( GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
Kokkos::View< Field< VarType::Vector2D, PIT > *, Kokkos::LayoutRight, HostType > &  E00_ff_h 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void get_field_Ah_cv_ff ( Field< VarType::Scalar, PhiInterpType::Planes > *  psn_Ah_cv_ff)

Here is the caller graph for this function:

template<typename FieldT , VarType VT, PhiInterpType PIT>
void get_field_grad ( const Simulation< DeviceType > &  sml,
const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
const MagneticField< DeviceType > &  magnetic_field,
ElectricField< DeviceType > &  electric_field,
const GradientMatrices< DeviceType > &  grad_matrices,
FieldFollowingCoordinates ff,
std::vector< Matrix< DeviceType >> &  gyro_avg_matrices,
FieldT &  psn_field,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
GridField< VarType::Scalar, PIT > &  field,
GridField< VT, PIT > &  dfield,
bool  calculate_E,
bool  do_get_E00 
)

Calculates a gyro-averaged potential and its gradients, in field-following coordinates (if XGC1). The calculations inside the calculate_E flag can probably be refactored and pulled out of get_field_grad for clarity.

Parameters
[in]gridis the grid object
[in]magnetic_fieldis the magnetic field object
[in]psn_fieldis the input potential
[out]psn_field_rho_ffis the gyroaveraged potential (field-following if XGC1)
[out]psn_dfield_rho_ffis the gyroaveraged gradient (field-following if XGC1)
[in]calculate_E_intis 1 if calculating E, which has some extra steps compared to the As or Ah calculation
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

void get_gyro_avg_mat_data ( int  ind,
int *  m,
int *  n,
int *  w,
int *  nnz,
int *  is_csr_int,
int **  csr_ridx_or_eindex,
int **  csr_cidx_or_nelement,
double **  values 
)
template<VarType VT, PhiInterpType PIT>
void get_pot_convert_to_ff ( const Grid< DeviceType > &  grid,
FieldFollowingCoordinates ff,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
bool  convert_00_field 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<VarType VT, PhiInterpType PIT>
void get_pot_epar ( const Simulation< DeviceType > &  sml,
const Grid< DeviceType > &  grid,
FieldFollowingCoordinates ff,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
bool  calculate_E_para_em 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void get_pot_epar_em_filter ( double *  tmp,
double *  E_para_em 
)

Here is the caller graph for this function:

template<VarType VT, PhiInterpType PIT>
void get_pot_grad ( const Simulation< DeviceType > &  sml,
const Grid< DeviceType > &  grid,
const ElectricField< DeviceType > &  electric_field,
const GradientMatrices< DeviceType > &  grad_matrices,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
bool  calculate_E 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<VarType VT, PhiInterpType PIT>
void get_pot_mat_mult ( const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
const std::vector< Matrix< DeviceType >> &  gyro_avg_matrices,
bool  calculate_E_para_em 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void get_potential_grad ( const Simulation< DeviceType > &  sml,
const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
const MagneticField< DeviceType > &  magnetic_field,
ElectricField< DeviceType > &  electric_field 
)

Calculates gyro-averaged electric field, electric potential in field-following coordinates (if XGC1) If EM, also calculates analogous magnetic potential and gradients

Parameters
[in]smlis the simulation object
[in]gridis the grid object
[in]magnetic_fieldis the magnetic field object
[in]electric_fieldis the electric field object
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

double* get_psn_ff_1dp_dx_loc ( )

Here is the caller graph for this function:

double* get_psn_ff_1dp_p_loc ( )

Here is the caller graph for this function:

int* get_psn_ff_1dp_tr_loc ( )

Here is the caller graph for this function:

rtype* get_psn_pbd0_2_iseg_loc ( )

Here is the caller graph for this function:

int get_psn_pbd0_2_nseg ( )

Here is the caller graph for this function:

template<VarType VT, PhiInterpType PIT>
void transpose_and_set_scalar_field ( const Grid< DeviceType > &  grid,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
const Kokkos::View< double ***, Kokkos::LayoutRight, DeviceType > &  tmp_field,
GridField< VarType::Scalar, PIT > &  field 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<VarType VT, PhiInterpType PIT>
void transpose_and_set_vector_field ( const Grid< DeviceType > &  grid,
GetPotentialGradTempViews< DeviceType, VT, PIT > &  tmp,
GridField< VT, PIT > &  dfield 
)

Here is the call graph for this function:

Here is the caller graph for this function: