XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions
get_potential_grad.cpp File Reference
#include "timer_macro.hpp"
#include "my_subview.hpp"
#include "loadable_buffer.hpp"
#include "task_group.hpp"
#include "grid_deriv.hpp"
#include "smoothing.hpp"
#include "get_potential_grad.hpp"
Include dependency graph for get_potential_grad.cpp:

Classes

class  InputPotential< Device, DeviceIn >
 

Functions

void get_field_Ah_cv_ff (const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, const GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::MultiplePlanes, KinType::DriftKin > &Ah_cv_h, const GridField< HostType, VarType::Scalar, PhiInterpType::Planes, TorType::OnePlane, KinType::DriftKin > &Ah_cv_ff)
 
template<class DeviceOut >
void broadcast_potentials (const DomainDecomposition< DeviceType > &pol_decomp, const View< double ***, CLayout, DeviceType > &potential_rho, const View< double ****, CLayout, DeviceType > &gradient_rho, const EMParField< DeviceType, DeviceOut > &E_para_em, bool potential_requested, bool gradient_requested)
 
template<class DeviceOut , VarType VT, PhiInterpType PIT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double ****, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VT, PIT, TorType::OnePlane, KinType::GyroKin > &field)
 
template<class DeviceOut , PhiInterpType PIT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double ***, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VarType::Scalar, PIT, TorType::OnePlane, KinType::GyroKin > &field)
 
template<class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double ***, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VT, PIT, TT, KinType::DriftKin > &field, int i_plane)
 
template<class DeviceOut , PhiInterpType PIT, TorType TT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double **, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VarType::Scalar, PIT, TT, KinType::DriftKin > &field, int i_plane)
 
template<class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double ****, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VT, PIT, TT, KinType::DriftKin > &field)
 
template<class DeviceOut , PhiInterpType PIT, TorType TT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double ***, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VarType::Scalar, PIT, TT, KinType::DriftKin > &field)
 
template<class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double ***, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VT, PIT, TT, KinType::GyroKin > &field, int i_plane)
 
template<class DeviceOut , PhiInterpType PIT, TorType TT>
void transpose_and_set_field (const View< double *, CLayout, DeviceType > &scratch, const View< double **, CLayout, DeviceType > &tmp_field, GridField< DeviceOut, VarType::Scalar, PIT, TT, KinType::GyroKin > &field, int i_plane)
 
void get_pot (const View< double *, CLayout, DeviceType > &potential, const Field00< DeviceType > &field00, bool ignore_poloidal_dpot, View< double *, CLayout, DeviceType > full_potential)
 
void get_poloidal_grad (const Grid< DeviceType > &grid, const GradientMatrices< DeviceType > &grad_matrices, const View< double *, CLayout, DeviceType > &potential, const Field00< DeviceType > &field00, bool ignore_poloidal_dpot, View< double *, CLayout, DeviceType > gradient_r, View< double *, CLayout, DeviceType > gradient_z)
 
void transpose_for_gyroavg (const View< double ***, CLayout, DeviceType > &gradient, View< double ****, CLayout, DeviceType > &gradient_rho)
 
template<class DeviceOut >
void get_pot_mat_mult (const DomainDecomposition< DeviceType > &pol_decomp, const GyroAverageMatrices< DeviceType > &gyro_avg_matrices, const View< double ***, CLayout, DeviceType > &field_rho, const View< double ****, CLayout, DeviceType > &gradient_rho, const EMParField< DeviceType, DeviceOut > &E_para_em, bool potential_requested, bool gradient_requested)
 
template<class DeviceIn >
void calculate_potential (bool reuse_right_plane_as_left_plane, int i_plane, const InputPotential< DeviceType, DeviceIn > &input_potential, const Field00< DeviceType > &field00, bool ignore_poloidal_dpot, AlternatingStorage< DeviceType > &potential_alt, View< double **, CLayout, DeviceType > &potential)
 
template<class DeviceIn >
void calculate_gradient (bool reuse_right_plane_as_left_plane, int i_plane, const Grid< DeviceType > &grid, const GradientMatrices< DeviceType > &grad_matrices, const GradParXTmp &gptx, const InputPotential< DeviceType, DeviceIn > &input_potential, const Field00< DeviceType > &field00, bool ignore_poloidal_dpot, AlternatingStorage< DeviceType > &gradient_r_alt, AlternatingStorage< DeviceType > &gradient_z_alt, View< double ***, CLayout, DeviceType > &gradient)
 
template<class DeviceIn , class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT, KinType KT>
void get_field_grad (const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field, Smoothing &smoothing, GetPotGradFieldArgs< DeviceIn, DeviceOut, VT, PIT, TT, KT > &args, GetPotentialGradTemp< DeviceType, DeviceOut > &tmp)
 

Function Documentation

template<class DeviceOut >
void broadcast_potentials ( const DomainDecomposition< DeviceType > &  pol_decomp,
const View< double ***, CLayout, DeviceType > &  potential_rho,
const View< double ****, CLayout, DeviceType > &  gradient_rho,
const EMParField< DeviceType, DeviceOut > &  E_para_em,
bool  potential_requested,
bool  gradient_requested 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class DeviceIn >
void calculate_gradient ( bool  reuse_right_plane_as_left_plane,
int  i_plane,
const Grid< DeviceType > &  grid,
const GradientMatrices< DeviceType > &  grad_matrices,
const GradParXTmp gptx,
const InputPotential< DeviceType, DeviceIn > &  input_potential,
const Field00< DeviceType > &  field00,
bool  ignore_poloidal_dpot,
AlternatingStorage< DeviceType > &  gradient_r_alt,
AlternatingStorage< DeviceType > &  gradient_z_alt,
View< double ***, CLayout, DeviceType > &  gradient 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class DeviceIn >
void calculate_potential ( bool  reuse_right_plane_as_left_plane,
int  i_plane,
const InputPotential< DeviceType, DeviceIn > &  input_potential,
const Field00< DeviceType > &  field00,
bool  ignore_poloidal_dpot,
AlternatingStorage< DeviceType > &  potential_alt,
View< double **, CLayout, DeviceType > &  potential 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

template<class DeviceIn , class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT, KinType KT>
void get_field_grad ( const Simulation< DeviceType > &  sml,
const Grid< DeviceType > &  grid,
const DomainDecomposition< DeviceType > &  pol_decomp,
const MagneticField< DeviceType > &  magnetic_field,
Smoothing smoothing,
GetPotGradFieldArgs< DeviceIn, DeviceOut, VT, PIT, TT, KT > &  args,
GetPotentialGradTemp< DeviceType, DeviceOut > &  tmp 
)

Calculates a gyro-averaged potential and its gradients, in field-following coordinates (if XGC1).

Parameters
[in]gridis the grid object
[in]magnetic_fieldis the magnetic field object
[in]input_potentialis the input potential
[out]psn_field_rho_ffis the gyroaveraged potential (field-following if XGC1)
[out]psn_gradient_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_poloidal_grad ( const Grid< DeviceType > &  grid,
const GradientMatrices< DeviceType > &  grad_matrices,
const View< double *, CLayout, DeviceType > &  potential,
const Field00< DeviceType > &  field00,
bool  ignore_poloidal_dpot,
View< double *, CLayout, DeviceType gradient_r,
View< double *, CLayout, DeviceType gradient_z 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void get_pot ( const View< double *, CLayout, DeviceType > &  potential,
const Field00< DeviceType > &  field00,
bool  ignore_poloidal_dpot,
View< double *, CLayout, DeviceType full_potential 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class DeviceOut >
void get_pot_mat_mult ( const DomainDecomposition< DeviceType > &  pol_decomp,
const GyroAverageMatrices< DeviceType > &  gyro_avg_matrices,
const View< double ***, CLayout, DeviceType > &  field_rho,
const View< double ****, CLayout, DeviceType > &  gradient_rho,
const EMParField< DeviceType, DeviceOut > &  E_para_em,
bool  potential_requested,
bool  gradient_requested 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class DeviceOut , VarType VT, PhiInterpType PIT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double ****, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VT, PIT, TorType::OnePlane, KinType::GyroKin > &  field 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class DeviceOut , PhiInterpType PIT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double ***, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VarType::Scalar, PIT, TorType::OnePlane, KinType::GyroKin > &  field 
)

Here is the call graph for this function:

template<class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double ***, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VT, PIT, TT, KinType::DriftKin > &  field,
int  i_plane 
)

Here is the call graph for this function:

template<class DeviceOut , PhiInterpType PIT, TorType TT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double **, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VarType::Scalar, PIT, TT, KinType::DriftKin > &  field,
int  i_plane 
)

Here is the call graph for this function:

template<class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double ****, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VT, PIT, TT, KinType::DriftKin > &  field 
)

Here is the call graph for this function:

template<class DeviceOut , PhiInterpType PIT, TorType TT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double ***, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VarType::Scalar, PIT, TT, KinType::DriftKin > &  field 
)

Here is the call graph for this function:

template<class DeviceOut , VarType VT, PhiInterpType PIT, TorType TT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double ***, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VT, PIT, TT, KinType::GyroKin > &  field,
int  i_plane 
)

Here is the call graph for this function:

template<class DeviceOut , PhiInterpType PIT, TorType TT>
void transpose_and_set_field ( const View< double *, CLayout, DeviceType > &  scratch,
const View< double **, CLayout, DeviceType > &  tmp_field,
GridField< DeviceOut, VarType::Scalar, PIT, TT, KinType::GyroKin > &  field,
int  i_plane 
)

Here is the call graph for this function:

void transpose_for_gyroavg ( const View< double ***, CLayout, DeviceType > &  gradient,
View< double ****, CLayout, DeviceType > &  gradient_rho 
)

Here is the call graph for this function:

Here is the caller graph for this function: