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 
5 // Heat Diagnostics class
6 template<class Device>
8  public:
9 
10  // Constructor for Mode 1
11  HeatDiagnostics(int heat_mode_in, int heat_nsection_in, int heat_npsi_in, int heat_nr_in, int heat_nz_in,
12  double *heat_rmin_in, double *heat_rmax_in, double *heat_dr_in, double *heat_zmin_in, double *heat_zmax_in, double *heat_dz_in,
13  double *heat_pmin_in, double *heat_dp_in, int nspecies, int nthreads);
14 
15  // Constructor for Mode 2
16  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);
17 
18  // Null constructor
20 
21  // Used in heat_port (in pushe)
22  int heat_mode;
23 
24  // Used in Mode 1
26  int heat_npsi;
27  int heat_nr;
28  int heat_nz;
29  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_rmin;
30  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_rmax;
31  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_dr;
32  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_zmin;
33  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_zmax;
34  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_dz;
35  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_pmin;
36  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_dp;
37 
38  Kokkos::View<double******,Kokkos::LayoutRight,Device> heat_pv;
39  Kokkos::View<double*****,Kokkos::LayoutRight,Device> heat_pv_psi;
40 
41  // Used in Mode 2
42  int heat_nseg;
43  int heat_nphi;
44  double heat_delta_phi;
45  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_r2;
46  Kokkos::View<double*,Kokkos::LayoutRight,Device> heat_z2;
47  Kokkos::View<double*****,Kokkos::LayoutRight,Device> heat_pv_psi2;
48 
49  // Sheath heat diagnostic
50  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>& bmag, const SimdConstants &ct, const SimdPhase &old_ph, const SimdVector2D &xff_old, const SimdPhase &new_ph, int stype) const;
51 
52  // Routine used in heat diagnostics - should be elsewhere?
53  KOKKOS_INLINE_FUNCTION int wall_cross2(double r1, double z1, double r2, double z2) const;
54 
55 };
56 
57 #include "heat_diagnostics.tpp"
58 #endif
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_rmin
First r bin.
Definition: heat_diagnostics.hpp:29
int heat_nphi
Number of phi bins.
Definition: heat_diagnostics.hpp:43
Definition: heat_diagnostics.hpp:7
int heat_nz
Number of z bins.
Definition: heat_diagnostics.hpp:28
Kokkos::View< double *****, Kokkos::LayoutRight, Device > heat_pv_psi2
Array for the heat diagnostic in (psi^2)
Definition: heat_diagnostics.hpp:47
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_dz
dz
Definition: heat_diagnostics.hpp:34
Definition: magnetic_field.hpp:9
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_r2
r2?
Definition: heat_diagnostics.hpp:45
int heat_nsection
Number of sections.
Definition: heat_diagnostics.hpp:25
Definition: grid.hpp:10
int heat_npsi
Number of psi bins.
Definition: heat_diagnostics.hpp:26
Kokkos::View< double *****, Kokkos::LayoutRight, Device > heat_pv_psi
Array for the heat diagnostic in (psi)
Definition: heat_diagnostics.hpp:39
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_pmin
First psi min.
Definition: heat_diagnostics.hpp:35
int heat_mode
Using mode 1 or mode 2.
Definition: heat_diagnostics.hpp:22
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_dp
dpsi
Definition: heat_diagnostics.hpp:36
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_dr
dr
Definition: heat_diagnostics.hpp:31
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_rmax
End of last r bin.
Definition: heat_diagnostics.hpp:30
Kokkos::View< double ******, Kokkos::LayoutRight, Device > heat_pv
Array for the heat diagnostic in (r,z)
Definition: heat_diagnostics.hpp:38
Definition: particles.hpp:21
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:11
Definition: simd.hpp:18
Definition: globals.hpp:54
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_zmax
End of last z bin.
Definition: heat_diagnostics.hpp:33
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 > &bmag, 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:19
int heat_nseg
Number of segments.
Definition: heat_diagnostics.hpp:42
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_z2
z2?
Definition: heat_diagnostics.hpp:46
double heat_delta_phi
dphi
Definition: heat_diagnostics.hpp:44
Kokkos::View< double *, Kokkos::LayoutRight, Device > heat_zmin
First z bin.
Definition: heat_diagnostics.hpp:32
int heat_nr
Number of r bins.
Definition: heat_diagnostics.hpp:27