XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
neutrals.hpp
Go to the documentation of this file.
1 #ifndef NEUTRALS_HPP
2 #define NEUTRALS_HPP
3 
4 #include "view_arithmetic.hpp"
5 #include "xgc_io.hpp"
6 #include "grid.hpp"
7 #include "plasma.hpp"
8 #include "vgrid_distribution.hpp"
9 #include "col_grid.hpp"
10 #include "diag_f0_df.hpp"
11 
12 // Neutrals class
13 template<class Device>
14 class Neutrals {
15 public:
16 
17  // Neutrals variables
18  bool use_ion_loss;
19  View<double*,CLayout,Device> weight_sum_lost;
20  View<double**,CLayout,Device> weight_wall_lost;
21 
22  View<double*,CLayout,HostType> weight_sum_lost_h;
23  View<double*,CLayout,HostType> weight_wall_lost_h;
24  View<double*,CLayout,HostType> node_dens_h;
25  View<double*,CLayout,HostType> node_temp_h;
26 
27  // Constructor
28  Neutrals( int nthreads, int nbins, int nnode);
29 
30  // "Null constructor"
32 
33  void write_checkpoint_files(const XGC_IO_Stream& stream) const;
34 
35  void read_checkpoint_files(const XGC_IO_Stream& stream);
36 
37  void copy_to_host() const;
38 
39  void clear_device_views() const;
40 
41  void apply(const Grid<DeviceType>& grid, const DomainDecomposition<DeviceType>& pol_decomp, const VelocityGrid& vgrid, Plasma& plasma, const VGridDistribution<DeviceType>& f0_f, const VGridDistribution<HostType>& f0_f_h, VGridDistribution<HostType>& f0_df0g_cumul, const int axisym_parallelization_int, int gstep, DiagF0DF& diag_f0_df) const;
42 };
43 #endif
View< double *, CLayout, HostType > node_temp_h
Definition: neutrals.hpp:25
void copy_to_host() const
Definition: diag_f0_df.hpp:9
void apply(const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, const VelocityGrid &vgrid, Plasma &plasma, const VGridDistribution< DeviceType > &f0_f, const VGridDistribution< HostType > &f0_f_h, VGridDistribution< HostType > &f0_df0g_cumul, const int axisym_parallelization_int, int gstep, DiagF0DF &diag_f0_df) const
void clear_device_views() const
Definition: velocity_grid.hpp:8
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:1248
bool use_ion_loss
Whether to use ONLY ion loss (i.e. dont track electron contribution)
Definition: neutrals.hpp:18
Definition: neutrals.hpp:14
void read_checkpoint_files(const XGC_IO_Stream &stream)
View< double *, CLayout, HostType > weight_wall_lost_h
Array to store how much was lost at the sheath, binned by wall index.
Definition: neutrals.hpp:23
Definition: vgrid_distribution.hpp:18
View< double **, CLayout, Device > weight_wall_lost
Array to store how much was lost at the sheath, binned by wall index.
Definition: neutrals.hpp:20
Definition: xgc_io.hpp:24
Neutrals()
Definition: neutrals.hpp:31
View< double *, CLayout, HostType > weight_sum_lost_h
Array to store how much was lost in total at the sheath.
Definition: neutrals.hpp:22
Definition: plasma.hpp:13
void write_checkpoint_files(const XGC_IO_Stream &stream) const
View< double *, CLayout, Device > weight_sum_lost
Array to store how much was lost in total at the sheath.
Definition: neutrals.hpp:19
View< double *, CLayout, HostType > node_dens_h
Definition: neutrals.hpp:24