XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
heat_diagnostics.hpp
Go to the documentation of this file.
1 #ifndef HEAT_DIAGNOSTICS_HPP
2 #define HEAT_DIAGNOSTICS_HPP
3 
4 #include "grid.hpp"
5 
6 namespace HeatDiag{
7  enum HEAT_DIAG{
8  NVAR = 5
9  };
10 }
11 
12 // Heat Diagnostics class
13 template<class Device>
15  public:
16 
17  // Constructor for Mode 1
18  HeatDiagnostics(int heat_mode_in, int heat_nsection_in, int heat_npsi_in, int heat_nr_in, int heat_nz_in,
19  double *heat_rmin_in, double *heat_rmax_in, double *heat_dr_in, double *heat_zmin_in, double *heat_zmax_in, double *heat_dz_in,
20  double *heat_pmin_in, double *heat_dp_in, int nspecies, int nthreads);
21 
22  // Constructor for Mode 2
23  HeatDiagnostics(int heat_mode_in, int heat_nseg_in, int heat_nphi_in, double heat_delta_phi_in, double *heat_r2_in, double *heat_z2_in, int nspecies, int nthreads);
24 
25  // Null constructor
27 
28  // Used in heat_port (in pushe)
29  int heat_mode;
30 
31  // Used in Mode 1
33  int heat_npsi;
34  int heat_nr;
35  int heat_nz;
36  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_rmin;
37  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_rmax;
38  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_dr;
39  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_zmin;
40  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_zmax;
41  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_dz;
42  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_pmin;
43  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_dp;
44 
45  Kokkos::View<double******,Kokkos::LayoutRight,Device> heat_pv;
46  Kokkos::View<double*****,Kokkos::LayoutRight,Device> heat_pv_psi;
47 
48  // Used in Mode 2
49  int heat_nseg;
50  int heat_nphi;
51  double heat_delta_phi;
52  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_r2;
53  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_z2;
54  Kokkos::View<double*****,Kokkos::LayoutRight,Device> heat_pv_psi2;
55 
56  // Sheath heat diagnostic
57  KOKKOS_INLINE_FUNCTION void heat_port(const Grid<Device> &grid, const MagneticField<Device> &magnetic_field, const Simd<bool>& just_left_the_grid, const Simd<double>& w, const Simd<double>& pot, const Simd<double>& epara, const Simd<double>& eperp, const SimdConstants &ct, const SimdPhase &old_ph, const SimdVector2D &xff_old, const SimdPhase &new_ph, int stype) const;
58 
59  // Routine used in heat diagnostics - should be elsewhere?
60  KOKKOS_INLINE_FUNCTION int wall_cross2(double r1, double z1, double r2, double z2) const;
61 
62 };
63 
64 #include "heat_diagnostics.tpp"
65 #endif
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_rmin
First r bin.
Definition: heat_diagnostics.hpp:36
int heat_nphi
Number of phi bins.
Definition: heat_diagnostics.hpp:50
Definition: heat_diagnostics.hpp:14
int heat_nz
Number of z bins.
Definition: heat_diagnostics.hpp:35
Kokkos::View< double *****, Kokkos::LayoutRight, Device > heat_pv_psi2
Array for the heat diagnostic in (psi^2)
Definition: heat_diagnostics.hpp:54
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_dz
dz
Definition: heat_diagnostics.hpp:41
Definition: magnetic_field.hpp:9
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_r2
r2?
Definition: heat_diagnostics.hpp:52
int heat_nsection
Number of sections.
Definition: heat_diagnostics.hpp:32
Definition: grid.hpp:10
int heat_npsi
Number of psi bins.
Definition: heat_diagnostics.hpp:33
Kokkos::View< double *****, Kokkos::LayoutRight, Device > heat_pv_psi
Array for the heat diagnostic in (psi)
Definition: heat_diagnostics.hpp:46
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_pmin
First psi min.
Definition: heat_diagnostics.hpp:42
int heat_mode
Using mode 1 or mode 2.
Definition: heat_diagnostics.hpp:29
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_dp
dpsi
Definition: heat_diagnostics.hpp:43
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_dr
dr
Definition: heat_diagnostics.hpp:38
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_rmax
End of last r bin.
Definition: heat_diagnostics.hpp:37
Definition: heat_diagnostics.hpp:8
Kokkos::View< double ******, Kokkos::LayoutRight, Device > heat_pv
Array for the heat diagnostic in (r,z)
Definition: heat_diagnostics.hpp:45
Definition: particles.hpp:24
KOKKOS_INLINE_FUNCTION int wall_cross2(double r1, double z1, double r2, double z2) const
Definition: heat_diagnostics.tpp:70
Definition: magnetic_field.F90:1
Definition: particles.hpp:14
HEAT_DIAG
Definition: heat_diagnostics.hpp:7
Definition: simd.hpp:18
Definition: globals.hpp:108
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_zmax
End of last z bin.
Definition: heat_diagnostics.hpp:40
KOKKOS_INLINE_FUNCTION void heat_port(const Grid< Device > &grid, const MagneticField< Device > &magnetic_field, const Simd< bool > &just_left_the_grid, const Simd< double > &w, const Simd< double > &pot, const Simd< double > &epara, const Simd< double > &eperp, const SimdConstants &ct, const SimdPhase &old_ph, const SimdVector2D &xff_old, const SimdPhase &new_ph, int stype) const
Definition: heat_diagnostics.tpp:157
HeatDiagnostics()
Definition: heat_diagnostics.hpp:26
int heat_nseg
Number of segments.
Definition: heat_diagnostics.hpp:49
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_z2
z2?
Definition: heat_diagnostics.hpp:53
double heat_delta_phi
dphi
Definition: heat_diagnostics.hpp:51
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_zmin
First z bin.
Definition: heat_diagnostics.hpp:39
int heat_nr
Number of r bins.
Definition: heat_diagnostics.hpp:34