XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "sml.hpp"
14 #include "grid.hpp"
15 #include "electric_field.hpp"
16 #include "sources.hpp"
17 #include "diagnostic.hpp"
18 
19 
21 
22  public:
23 
25 
26  void init(NLReader::NamelistReader& nlr, int f_source_period, const std::string& name){
27  nlr.use_namelist("diag_param");
28  bool is_on = nlr.get<bool>("diag_current_drive_on",false);
29  int loop_vol_diag_period = f_source_period*nlr.get<int>("diag_current_drive_period",1);
30 
31  if (is_on) Diagnostic::init(name, loop_vol_diag_period);
32  }
33 
34  void write(const Simulation<DeviceType> &sml, const Grid<DeviceType>& grid,
35  const ElectricField<DeviceType>& electric_field,
36  View<double*, CLayout, HostType>& jpara_diff_current
37  );
38 };
39 
40 #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: electric_field.hpp:41
void init(const std::string &name, int period, int first_step=-1)
Definition: diagnostic.hpp:46
bool is_on
Definition: diagnostic.hpp:20
LoopVolDiagnostics()
Definition: loop_voltage_diag.hpp:24
void use_namelist(const string &namelist)
Definition: NamelistReader.hpp:355
void init(NLReader::NamelistReader &nlr, int f_source_period, const std::string &name)
Definition: loop_voltage_diag.hpp:26
void write(const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const ElectricField< DeviceType > &electric_field, View< double *, CLayout, HostType > &jpara_diff_current)
Definition: loop_voltage_diag.cpp:30
Definition: diagnostic.hpp:10
Definition: loop_voltage_diag.hpp:20