XGC1
loop_voltage_diag.hpp
Go to the documentation of this file.
1 
10 #ifndef LOOP_VOLTAGE_DIAG_HPP
11 #define LOOP_VOLTAGE_DIAG_HPP
12 
13 #include "grid.hpp"
14 #include "diagnostic.hpp"
15 #include "grid_field.hpp"
16 
17 
19 
20  public:
21 
23 
24  void init(NLReader::NamelistReader& nlr, int f_source_period, const std::string& name){
25  nlr.use_namelist("diag_param");
26  bool is_on = nlr.get<bool>("diag_current_drive_on",false);
27  int loop_vol_diag_period = f_source_period*nlr.get<int>("diag_current_drive_period",1);
28 
29  if (is_on) Diagnostic::init(name, loop_vol_diag_period);
30  }
31 
32  void write(const Grid<DeviceType>& grid,
36  const View<double*, CLayout, HostType>& jpara_diff_current, int gstep, double time);
37 };
38 
39 #endif
Definition: diagnostic.hpp:10
void init(const std::string &name, int period, int first_step=-1)
Definition: diagnostic.hpp:46
bool is_on
Definition: diagnostic.hpp:20
Definition: loop_voltage_diag.hpp:18
void write(const Grid< DeviceType > &grid, const GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > &loop_voltage_h, const GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > &jpara_diff_previous_h, const GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > &jpara_diff_integral_h, const View< double *, CLayout, HostType > &jpara_diff_current, int gstep, double time)
Definition: loop_voltage_diag.cpp:28
LoopVolDiagnostics()
Definition: loop_voltage_diag.hpp:22
void init(NLReader::NamelistReader &nlr, int f_source_period, const std::string &name)
Definition: loop_voltage_diag.hpp:24
Definition: NamelistReader.hpp:193
T get(const string &param, const T default_val, int val_ind=0)
Definition: NamelistReader.hpp:386
void use_namelist(const string &namelist, Options required=Required)
Definition: NamelistReader.hpp:360