XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
diag_1d.hpp
Go to the documentation of this file.
1 #ifndef DIAG_1D_HPP
2 #define DIAG_1D_HPP
3 
4 #include "diagnostic.hpp"
5 #include "grid.hpp"
6 #include "plasma.hpp"
7 #include "charge.hpp"
8 
9 class Diag1D : public Diagnostic{
10 
11  enum VarNames{
32  };
33 
34  std::vector<std::string> var_names;
35 
37  bool f0_diag_on;
38 
39  View<double***,CLayout,HostType> d1d_f_pv1_h;
40  View<double***,CLayout,HostType> d1d_df_pv1_h;
41 
42  View<double*,CLayout,HostType> diag_1d_vol_h;
43 
44  public:
45 
46  Diag1D() : Diagnostic() {}
47 
48  void write_volume();
49 
50  void init(NLReader::NamelistReader& nlr, const DomainDecomposition<DeviceType>& pol_decomp, const Grid<DeviceType>& grid, const MagneticField<DeviceType>& magnetic_field, const Plasma& plasma, bool allocate_df_diagnostic);
51 
52  View<double***,CLayout,HostType> diag_1d_f0(const Grid<DeviceType>& grid, const MagneticField<DeviceType>& magnetic_field, const DomainDecomposition<DeviceType>& pol_decomp, const VelocityGrid& vgrid, Plasma& plasma);
53 
54  void write(const Grid<DeviceType>& grid, const MagneticField<DeviceType>& magnetic_field, const DomainDecomposition<DeviceType>& pol_decomp, const VelocityGrid& vgrid, Plasma& plasma, const Charges& charges, const ElectricField<DeviceType>& electric_field, double time, int gstep);
55 
56  void reduce_and_copy_to_host(const View<double****,CLayout,DeviceType>& d1d_f_pv1, const View<double****,CLayout,DeviceType>& d1d_df_pv1) const;
57 
58  void clear();
59 };
60 
61 #endif
Definition: diag_1d.hpp:28
Definition: diag_1d.hpp:30
Definition: charge.hpp:66
Diag1D()
Definition: diag_1d.hpp:46
Definition: diag_1d.hpp:19
Definition: diag_1d.hpp:22
void write(const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, const VelocityGrid &vgrid, Plasma &plasma, const Charges &charges, const ElectricField< DeviceType > &electric_field, double time, int gstep)
Definition: diag_1d.cpp:235
Definition: velocity_grid.hpp:8
VarNames
Definition: diag_1d.hpp:11
subroutine plasma(grid, itr, p, dene_out, deni_out, Te_out, Ti_out, Vparai_out)
Calculate the plasma density, temperature, and parallel velocity for a point in triangle itr using pl...
Definition: neutral_totalf.F90:1224
Definition: diag_1d.hpp:18
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:12
Definition: electric_field.hpp:41
Definition: diag_1d.hpp:31
Definition: diag_1d.hpp:21
bool f0_diag_on
Definition: diag_1d.hpp:37
void reduce_and_copy_to_host(const View< double ****, CLayout, DeviceType > &d1d_f_pv1, const View< double ****, CLayout, DeviceType > &d1d_df_pv1) const
Definition: diag_1d.cpp:391
Definition: diag_1d.hpp:29
View< double ***, CLayout, HostType > d1d_f_pv1_h
Definition: diag_1d.hpp:39
Definition: diag_1d.hpp:26
Definition: diag_1d.hpp:13
Definition: diag_1d.hpp:9
void init(NLReader::NamelistReader &nlr, const DomainDecomposition< DeviceType > &pol_decomp, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const Plasma &plasma, bool allocate_df_diagnostic)
Definition: diag_1d.cpp:182
View< double *, CLayout, HostType > diag_1d_vol_h
Definition: diag_1d.hpp:42
Definition: diag_1d.hpp:15
std::vector< std::string > var_names
Definition: diag_1d.hpp:34
Definition: diag_1d.hpp:25
void write_volume()
Definition: diag_1d.cpp:169
Definition: diag_1d.hpp:20
Definition: diag_1d.hpp:12
View< double ***, CLayout, HostType > d1d_df_pv1_h
Definition: diag_1d.hpp:40
Definition: diag_1d.hpp:14
Definition: diag_1d.hpp:17
Definition: magnetic_field.F90:1
Definition: diag_1d.hpp:24
Definition: plasma.hpp:13
Definition: diag_1d.hpp:27
Definition: diagnostic.hpp:10
void clear()
Definition: diag_1d.cpp:400
View< double ***, CLayout, HostType > diag_1d_f0(const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, const VelocityGrid &vgrid, Plasma &plasma)
Definition: diag_1d.cpp:10
Definition: diag_1d.hpp:23
Definition: diag_1d.hpp:16
bool deltaf_diag_on
Definition: diag_1d.hpp:36