1 #ifndef GYRO_AVG_MAT_HPP
2 #define GYRO_AVG_MAT_HPP
11 template<
class Device>
34 template<
class Device2>
38 const std::string label (
"v_outer");
50 GPTLstop(
"GET_POT_GRAD_GYROMAT_SETUP");
60 ,
const MPI_Comm& plane_comm
64 void get_pot_mat_mult(
const View<double***,CLayout, DeviceType>& field_rho,
const View<double****,CLayout, DeviceType>& gradient_rho,
const View<double***,CLayout, DeviceType>& E_para_em,
bool potential_requested,
bool gradient_requested,
bool E_para_em_requested)
const;
66 void broadcast_potentials(
const View<double***,CLayout, DeviceType>& potential_rho,
const View<double****,CLayout, DeviceType>& gradient_rho,
const View<double***,CLayout, DeviceType>& E_para_em,
bool potential_requested,
bool gradient_requested,
bool E_para_em_requested)
const;
68 void get_gyroaveraged(
const View<double***,CLayout, DeviceType>& field_rho,
const View<double****,CLayout, DeviceType>& gradient_rho,
const View<double***,CLayout, DeviceType>& E_para_em,
bool potential_requested,
bool gradient_requested,
bool E_para_em_requested)
const;
71 const View<double**, CLayout, DeviceType>& flow_rho,
72 const View<double**, CLayout, DeviceType>& energy_rho,
73 const View<double**, CLayout, DeviceType>& density_f0g_rho,
74 const View<double*, CLayout, DeviceType>& density,
75 const View<double*, CLayout, DeviceType>& flow,
76 const View<double*, CLayout, DeviceType>& energy,
77 const View<double*, CLayout, DeviceType>& density_f0g
79 ,
const MPI_Comm& plane_comm
void iterative_gyroaverage(Matrix< DeviceType > &gyromatrix, bool print_residual, View< double *, CLayout, DeviceType > &view) const
static int GPTLstart(const char *name)
Definition: timer_macro.hpp:9
void gyroaverage_moments(const View< double **, CLayout, DeviceType > &density_rho, const View< double **, CLayout, DeviceType > &flow_rho, const View< double **, CLayout, DeviceType > &energy_rho, const View< double **, CLayout, DeviceType > &density_f0g_rho, const View< double *, CLayout, DeviceType > &density, const View< double *, CLayout, DeviceType > &flow, const View< double *, CLayout, DeviceType > &energy, const View< double *, CLayout, DeviceType > &density_f0g) const
Definition: gyro_avg_mat.hpp:12
void smooth_with_last_gyroaverage(bool print_residual, View< double *, CLayout, DeviceType > &delta_n) const
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:12
GyroAverageMatrices< Device2 > mirror() const
Definition: gyro_avg_mat.hpp:35
TaskGroup task_group
Definition: gyro_avg_mat.hpp:20
void broadcast_potentials(const View< double ***, CLayout, DeviceType > &potential_rho, const View< double ****, CLayout, DeviceType > &gradient_rho, const View< double ***, CLayout, DeviceType > &E_para_em, bool potential_requested, bool gradient_requested, bool E_para_em_requested) const
int nrho
Definition: gyro_avg_mat.hpp:16
A class that manages the distribution and execution of tasks in parallel using the MPI library...
Definition: task_group.hpp:14
int find_a_plane_rank_with_last_gyromatrix() const
double inv_drho
Definition: gyro_avg_mat.hpp:18
void get_pot_mat_mult(const View< double ***, CLayout, DeviceType > &field_rho, const View< double ****, CLayout, DeviceType > &gradient_rho, const View< double ***, CLayout, DeviceType > &E_para_em, bool potential_requested, bool gradient_requested, bool E_para_em_requested) const
void gyroaverage_field(const Grid< DeviceType > &grid, View< double ***, CLayout, HostType > &field_rho) const
Definition: matrix.hpp:13
HostArray< Matrix< Device > > matrices
Definition: gyro_avg_mat.hpp:14
Matrix< Device > operator[](int i) const
Definition: gyro_avg_mat.hpp:23
GyroAverageMatrices()
Definition: gyro_avg_mat.hpp:28
int nphi
Definition: gyro_avg_mat.hpp:19
Definition: magnetic_field.F90:1
void get_gyroaveraged(const View< double ***, CLayout, DeviceType > &field_rho, const View< double ****, CLayout, DeviceType > &gradient_rho, const View< double ***, CLayout, DeviceType > &E_para_em, bool potential_requested, bool gradient_requested, bool E_para_em_requested) const
size_t size() const
Definition: host_array.hpp:78
Definition: host_array.hpp:11
double rhomax
Definition: gyro_avg_mat.hpp:17
static int GPTLstop(const char *name)
Definition: timer_macro.hpp:10
void init_one_gyro_avg_mat(const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, Matrix< Device > &matrix, int iphi, int irho, bool is_field_following, int n_larmor_pts)
Definition: gyro_avg_mat.cpp:75