XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
validity_check.hpp
Go to the documentation of this file.
1 #ifndef VALIDITY_CHECK_HPP
2 #define VALIDITY_CHECK_HPP
3 
4 #include "grid.hpp"
6 #include "plasma.hpp"
7 
8 namespace ValidityCheck{
9 
10 // The various ways a particle can be invalid
11 enum Counts{
21  N
22 };
23 
29 };
30 
31 struct Options{
35 
37  : deactivate_invalid(false),
39  {
40  // By default, run all tests except the GID test (since dead particles aren't generally bad
41  for(int i=0; i<Counts::N; i++) checks[i]=true;
42  checks[InvalidGID] = false;
43  }
44 };
45 
46 void particle_validity_check_one_sp(const std::string& label, const Grid<DeviceType> &grid, const MagneticField<DeviceType> &magnetic_field,
47  const DomainDecomposition<DeviceType> &pol_decomp, Species<DeviceType>& species, const Options& options, View<int*, DeviceType>& counts);
48 
49 void particle_validity_check(const std::string& label, const Grid<DeviceType> &grid, const MagneticField<DeviceType> &magnetic_field,
50  const DomainDecomposition<DeviceType> &pol_decomp, Plasma& plasma, const Options& options);
51 
52 void plasma_validity_check(const std::string& label, const Grid<DeviceType> &grid, const MagneticField<DeviceType> &magnetic_field,
53  const DomainDecomposition<DeviceType> &pol_decomp, Plasma& plasma, const Options& options);
54 
55 }
56 
57 #endif
void particle_validity_check_one_sp(const std::string &label, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, Species< DeviceType > &species, const Options &options, View< int *, DeviceType > &counts)
Definition: validity_check.cpp:41
Definition: validity_check.hpp:27
void particle_validity_check(const std::string &label, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, Plasma &plasma, const Options &options=Options())
Definition: validity_check.cpp:199
Options()
Definition: validity_check.hpp:36
Definition: validity_check.hpp:20
bool checks[Counts::N]
Definition: validity_check.hpp:32
Definition: validity_check.hpp:26
Definition: validity_check.hpp:15
bool deactivate_invalid
Definition: validity_check.hpp:33
Counts
Definition: validity_check.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: magnetic_field.hpp:12
Definition: validity_check.hpp:25
Definition: validity_check.hpp:14
Definition: validity_check.hpp:16
Definition: validity_check.hpp:28
ReportingOption
Definition: validity_check.hpp:24
Definition: col_grid.hpp:35
Definition: validity_check.hpp:18
Definition: validity_check.hpp:12
Definition: magnetic_field.F90:1
Definition: validity_check.hpp:21
Definition: validity_check.hpp:31
Definition: plasma.hpp:13
Definition: validity_check.hpp:19
Definition: validity_check.hpp:13
void plasma_validity_check(const std::string &label, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, Plasma &plasma, const Options &options=Options())
Definition: validity_check.cpp:214
Definition: validity_check.hpp:17
Definition: species.hpp:75
ReportingOption reporting
Definition: validity_check.hpp:34