1 #ifndef GYRO_AVG_MAT_HPP
2 #define GYRO_AVG_MAT_HPP
17 template<
class Device>
75 const MPI_Comm& plane_comm,
77 const View<double**,CLayout,HostType>& field)
const;
79 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;
81 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;
83 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;
86 const View<double**, CLayout, DeviceType>& flow_rho,
87 const View<double**, CLayout, DeviceType>& energy_rho,
88 const View<double**, CLayout, DeviceType>& density_f0g_rho,
89 const View<double*, CLayout, DeviceType>& density,
90 const View<double*, CLayout, DeviceType>& flow,
91 const View<double*, CLayout, DeviceType>& energy,
92 const View<double*, CLayout, DeviceType>& density_f0g
94 ,
const MPI_Comm& plane_comm
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)
GyroCommMethod gyro_comm_method
Definition: gyro_avg_mat.hpp:27
Definition: gyro_avg_mat.hpp:18
void init_one_gyro_avg_mat(const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, Matrix< HostType > &matrix, int iphi, int irho, bool is_field_following, int n_larmor_pts)
Definition: gyro_avg_mat.cpp:100
void copy_to_device_if_not_resident()
Definition: gyro_avg_mat.hpp:50
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:12
void gyroaverage_field(const Grid< DeviceType > &grid, const View< double ***, CLayout, DeviceType > &field_rho, const View< double **, CLayout, HostType > &field) const
TaskGroup task_group
Definition: gyro_avg_mat.hpp:30
void iterative_gyroaverage(Matrix< DeviceType > &gyromatrix, bool print_residual, View< double *, CLayout, DeviceType > &view) const
Definition: gyro_avg_mat.cpp:742
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:23
A class that manages the distribution and execution of tasks in parallel using the MPI library...
Definition: task_group.hpp:14
void deallocate_device_matrices_if_not_resident()
Definition: gyro_avg_mat.hpp:56
bool resident_on_device
Definition: gyro_avg_mat.hpp:28
GyroCommMethod
Definition: gyro_avg_mat.hpp:11
double inv_drho
Definition: gyro_avg_mat.hpp:25
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 smooth_with_last_gyroaverage(bool print_residual, View< double *, CLayout, DeviceType > &delta_n) const
Definition: gyro_avg_mat.cpp:767
Definition: matrix.hpp:11
HostArray< Matrix< Device > > matrices
Definition: gyro_avg_mat.hpp:20
HostArray< Matrix< HostType > > matrices_h
Definition: gyro_avg_mat.hpp:21
GyroAverageMatrices()
Definition: gyro_avg_mat.hpp:35
int nphi
Definition: gyro_avg_mat.hpp:26
GyroCommMethod read_gyro_comm_method(NLReader::NamelistReader &nlr) const
Definition: gyro_avg_mat.cpp:12
Definition: magnetic_field.F90:1
int find_a_plane_rank_with_last_gyromatrix() const
Definition: gyro_avg_mat.cpp:721
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
void copy_matrices_to_device()
Definition: gyro_avg_mat.hpp:44
Definition: host_array.hpp:11
double rhomax
Definition: gyro_avg_mat.hpp:24