XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pushe_diagnostics.hpp
Go to the documentation of this file.
1 #ifndef PUSHE_DIAGNOSTICS_HPP
2 #define PUSHE_DIAGNOSTICS_HPP
3 
4 #include "push_controls.hpp"
5 #include "electric_field.hpp"
6 #include "perturbed_B_field.hpp"
7 
8 namespace Diag{
9  enum VF_DIAG{
11  };
12 
13  enum D1D_PV1{
14 #ifdef XGC1
15  D1D_NPV1 = 16
16 #else
17  D1D_NPV1 = 18
18 #endif
19  };
20 }
21 
22 // Diagnostics class
23 template<class Device>
24 class Diagnostics {
25  public:
26 
27  // Used in diag_1d_port1 (in pushe)
28  int d1d_period;
29 
30  // Arrays
31  Kokkos::View<double****,Kokkos::LayoutRight,Device> d1d_f_pv1;
32  Kokkos::View<double****,Kokkos::LayoutRight,Device> d1d_df_pv1;
33 
34  // Constructor
35  Diagnostics(NLReader::NamelistReader& nlr, bool allocate_df_diagnostic, int np, int nspecies, int nthreads);
36 
37  // Null constructor
39 
40  // Check whether to record diagnostics
41  inline bool determine_diag_on(int istep,int ipc);
42 
43  // General 1D push diagnostics
44  KOKKOS_INLINE_FUNCTION void d1d_port1(const Grid<Device> &grid, const Species<Device> &species, const MagneticField<Device> &magnetic_field, const SimdParticles &part,const SimdPhase &derivs,int sp_type, const Simd<double> *vd) const;
45 
46 };
47 
48 template<class Device>
49 KOKKOS_INLINE_FUNCTION void push_diagnostics_c(const TmpSpecies<Device>& tmp_species, const Grid<Device> &grid,
50  const MagneticField<Device> &magnetic_field, const ElectricField<Device> &electric_field,
51  const Diagnostics<Device> &diag, const PushControls &push_controls, const Species<Device> &species,
52  const PerturbedBField<Device> &perturbed_B_field, int);
53 
54 #include "pushe_diagnostics.tpp"
55 #endif
Definition: perturbed_B_field.hpp:16
KOKKOS_INLINE_FUNCTION void push_diagnostics_c(const TmpSpecies< Device > &tmp_species, const Grid< Device > &grid, const MagneticField< Device > &magnetic_field, const ElectricField< Device > &electric_field, const Diagnostics< Device > &diag, const PushControls &push_controls, const Species< Device > &species, const PerturbedBField< Device > &perturbed_B_field, int)
Definition: pushe_diagnostics.tpp:33
Definition: pushe_diagnostics.hpp:10
Definition: push_controls.hpp:8
Definition: NamelistReader.hpp:163
Definition: magnetic_field.hpp:9
Definition: electric_field.hpp:72
Definition: grid.hpp:10
D1D_PV1
Definition: pushe_diagnostics.hpp:13
int d1d_period
steps between diag recording
Definition: pushe_diagnostics.hpp:28
KOKKOS_INLINE_FUNCTION void d1d_port1(const Grid< Device > &grid, const Species< Device > &species, const MagneticField< Device > &magnetic_field, const SimdParticles &part, const SimdPhase &derivs, int sp_type, const Simd< double > *vd) const
Definition: pushe_diagnostics.tpp:65
Definition: particles.hpp:31
Diagnostics()
Definition: pushe_diagnostics.hpp:38
Definition: magnetic_field.F90:1
Definition: particles.hpp:14
Definition: pushe_diagnostics.hpp:17
Definition: species.hpp:21
Definition: species.hpp:239
Definition: pushe_diagnostics.hpp:24
VF_DIAG
Definition: pushe_diagnostics.hpp:9
Kokkos::View< double ****, Kokkos::LayoutRight, Device > d1d_df_pv1
Array of delta f diagnostic quantities (optional)
Definition: pushe_diagnostics.hpp:32
Kokkos::View< double ****, Kokkos::LayoutRight, Device > d1d_f_pv1
Array of diagnostic quantities.
Definition: pushe_diagnostics.hpp:31
bool determine_diag_on(int istep, int ipc)
Definition: pushe_diagnostics.tpp:24