XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pseudo_inverse_diag.hpp
Go to the documentation of this file.
1 
15 #ifndef PSEUDO_INVERSE_DIAG_HPP
16 #define PSEUDO_INVERSE_DIAG_HPP
17 
18 #include "sml.hpp"
19 #include "grid.hpp"
20 #include "magnetic_field.hpp"
21 #include "species.hpp"
22 #include "sources.hpp"
23 #include "diagnostic.hpp"
24 
25 
27 
28  public:
29 
31 
32  void init(NLReader::NamelistReader& nlr, int f_source_period, const std::string& name){
33  nlr.use_namelist("diag_param");
34  bool is_on = nlr.get<bool>("diag_pseudo_inv_on", false);
35 
36  if (is_on) Diagnostic::init(name, f_source_period);
37  }
38 
39  void write(const Simulation<DeviceType> &sml, const Grid<DeviceType>& grid,
41  const Species<DeviceType>& species,
42  const DomainDecomposition<DeviceType>& pol_decomp,
43  uint64_t plane, int n_species,
44  int n_nodes_all, int n_nodes_pseudo_inv_converged_all,
45  int n_nodes_pseudo_inv_diverged_all, int n_nodes_pseudo_inv_skipped_all,
46  View<int*, CLayout, HostType> pseudo_inv_num_its,
47  View<bool*, CLayout, HostType> pseudo_inv_converged_node
48  );
49 };
50 
51 #endif
T get(const string &param, const T default_val, int val_ind=0)
Definition: NamelistReader.hpp:373
Definition: sml.hpp:8
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:12
void init(const std::string &name, int period, int first_step=-1)
Definition: diagnostic.hpp:42
bool is_on
Definition: diagnostic.hpp:24
void use_namelist(const string &namelist)
Definition: NamelistReader.hpp:355
Definition: pseudo_inverse_diag.hpp:26
Definition: magnetic_field.F90:1
PseudoInvDiagnostics()
Definition: pseudo_inverse_diag.hpp:30
Definition: diagnostic.hpp:12
Definition: species.hpp:74
void init(NLReader::NamelistReader &nlr, int f_source_period, const std::string &name)
Definition: pseudo_inverse_diag.hpp:32
void write(const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const Species< DeviceType > &species, const DomainDecomposition< DeviceType > &pol_decomp, uint64_t plane, int n_species, int n_nodes_all, int n_nodes_pseudo_inv_converged_all, int n_nodes_pseudo_inv_diverged_all, int n_nodes_pseudo_inv_skipped_all, View< int *, CLayout, HostType > pseudo_inv_num_its, View< bool *, CLayout, HostType > pseudo_inv_converged_node)
Definition: pseudo_inverse_diag.cpp:47