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 >
 

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 ()
 
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)
 
void get_pot_convert_to_ff (const Grid< DeviceType > &grid, FieldFollowingCoordinates &ff, GetPotentialGradTempViews< DeviceType > &tmp, bool convert_00_field)
 
void broadcast_potentials (const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, bool calculate_E_para_em, GetPotentialGradTempViews< DeviceType > &tmp)
 
template<typename VectorT >
void transpose_and_set_vector_field (const Grid< DeviceType > &grid, GetPotentialGradTempViews< DeviceType > &tmp, GridField< VectorT > &dfield)
 
void get_pot_grad (const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const ElectricField< DeviceType > &electric_field, const GradientMatrices< DeviceType > &grad_matrices, GetPotentialGradTempViews< DeviceType > &tmp, bool calculate_E)
 
void assign_to_tmp (GetPotentialGradTempViews< DeviceType > &tmp)
 
void get_pot_mat_mult (const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, GetPotentialGradTempViews< DeviceType > &tmp, const std::vector< Matrix< DeviceType >> &gyro_avg_matrices, bool calculate_E_para_em)
 
template<typename FieldT , typename ScalarT , typename VectorT >
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 > &tmp, GridField< ScalarT > &field, GridField< VectorT > &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

void assign_to_tmp ( GetPotentialGradTempViews< DeviceType > &  tmp)

Here is the call graph for this function:

Here is the caller graph for this function:

void broadcast_potentials ( const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
bool  calculate_E_para_em,
GetPotentialGradTempViews< DeviceType > &  tmp 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void get_field_Ah_cv_ff ( )

Here is the caller graph for this function:

template<typename FieldT , typename ScalarT , typename VectorT >
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 > &  tmp,
GridField< ScalarT > &  field,
GridField< VectorT > &  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 
)

Here is the caller graph for this function:

void get_pot_convert_to_ff ( const Grid< DeviceType > &  grid,
FieldFollowingCoordinates ff,
GetPotentialGradTempViews< DeviceType > &  tmp,
bool  convert_00_field 
)

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 
)
void get_pot_grad ( const Simulation< DeviceType > &  sml,
const Grid< DeviceType > &  grid,
const ElectricField< DeviceType > &  electric_field,
const GradientMatrices< DeviceType > &  grad_matrices,
GetPotentialGradTempViews< DeviceType > &  tmp,
bool  calculate_E 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void get_pot_mat_mult ( const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
GetPotentialGradTempViews< DeviceType > &  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
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<typename VectorT >
void transpose_and_set_vector_field ( const Grid< DeviceType > &  grid,
GetPotentialGradTempViews< DeviceType > &  tmp,
GridField< VectorT > &  dfield 
)

Here is the call graph for this function:

Here is the caller graph for this function: