All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Go to the documentation of this file.
1 #ifndef CPP_SML_HPP
2 #define CPP_SML_HPP
3 #include "space_settings.hpp"
5 // Simulation class
6 template<class Device>
7 class Simulation {
8  public:
10  // Constructor
11  Simulation(int bounce_in, double dt_in, int ncycle_half_in, int sort_frequency_in, int sheath_mode_in, bool sheath_adjust_in,
12  bool ptb_3db_on_in, bool drift_on_in, bool neutrals_in, int nspecies_in, int bounce_zero_weight_in,
13  double bounce_buffer_in, bool diag_heat_on_in, bool deltaf_in, bool xz_00_up_in,
14  int mstep_in, int nrk_in, bool electron_on_in, bool coupling_on_in, bool f0_grid, bool limit_marker_den,
15  int special_in, bool exclude_private_in, int nthreads_in
16 #ifdef DELTAF_CONV
17  , bool dwdt_fix_bg_in, bool dwdt_exb_only_in, int deltaf_f0_mode_in, double f0_1_Ln_in, double f0_1_Lt_e_in
18 #endif
19 #ifdef EXPLICIT_EM
20  , bool em_mixed_variable_in, bool em_control_variate_in, int em_pullback_mode_in, int em_control_variate_niter_in
21  , bool em_control_variate_final_cv_in, bool em_control_variate_flag_in
22 #ifdef EM_B_PARA_EFF
23  , bool em_b_para_eff_in
24 #endif
25 #endif
26  );
28  // "Null constructor"
31  // Input parameters
32  int bounce;
34  double bounce_buffer;
35  double dt;
39  bool ptb_3db_on;
40  bool drift_on;
41  bool neutrals;
42  int nspecies;
43  bool diag_heat_on;
44  bool deltaf;
45  bool xz_00_up;
47  int mstep;
48  int nrk;
49  bool electron_on;
50  bool coupling_on;
51  bool f0_grid;
53  int special;
54  int nthreads;
55  bool field_solver_on=true;
56 #ifdef DELTAF_CONV
57  bool dwdt_fix_bg; // 1-w factor in dwdt
58  bool dwdt_exb_only; // excluding grad-b drift in dwdt
59  int deltaf_f0_mode; // -2 for self-consistent gradient, -1 for vertual constant gradient
60  double f0_1_Ln, f0_1_Lt_e ; // vertual constant gradient input
61 #endif
62 #ifdef EXPLICIT_EM
63  bool em_mixed_variable;
64  bool em_control_variate;
65  int em_pullback_mode;
66  bool em_control_variate_final_cv;
67  bool em_control_variate_flag;
68  int em_control_variate_niter;
69 #ifdef EM_B_PARA_EFF
70  bool em_b_para_eff;
71 #endif
72 #endif
75  // Used in collisions
78  // Used in getf0
79  bool initial_flow;
81  double dpot_te_limit;
83  // Simulation variables
84  double time;
85  int gstep;
86  int ipc;
88 };
90 #include "cpp_sml.tpp"
91 #endif
bool drift_on
Toggle for using drift.
Definition: cpp_sml.hpp:40
int nrk
number of RK loops
Definition: cpp_sml.hpp:48
Definition: cpp_sml.hpp:7
int f_source_period
Frequency of collisions.
Definition: cpp_sml.hpp:76
bool exclude_private
Whether to exclude private region in ion charge deposition.
Definition: cpp_sml.hpp:73
int bounce_zero_weight
Whether to zero out weight at bounce.
Definition: cpp_sml.hpp:33
Definition: cpp_sml.hpp:29
int gstep
Current time step.
Definition: cpp_sml.hpp:85
bool diag_heat_on
Use heat diagnostics in sheath.
Definition: cpp_sml.hpp:43
bool xz_00_up
Use upper region of xz when obtaining 00 mode.
Definition: cpp_sml.hpp:45
bool update_poisson_solver
Whether poisson solver is updated.
Definition: cpp_sml.hpp:80
bool field_solver_on
If false, charge deposition and field solve is skipped.
Definition: cpp_sml.hpp:55
int nthreads
Number of OMP threads on the host.
Definition: cpp_sml.hpp:54
int ncycle_half
Half the number of subcycles.
Definition: cpp_sml.hpp:36
bool deltaf
Whether some species is deltaf.
Definition: cpp_sml.hpp:44
int ipc
RK2 loop index.
Definition: cpp_sml.hpp:86
int ncycles_between_sorts
Number of subcycles between sorts.
Definition: cpp_sml.hpp:46
bool sheath_adjust
Whether to adjust the sheath.
Definition: cpp_sml.hpp:38
int special
Special run (eg single particle, poincare)
Definition: cpp_sml.hpp:53
double time
Current simulation time.
Definition: cpp_sml.hpp:84
bool f0_grid
Whether to use f0 grid.
Definition: cpp_sml.hpp:51
int nspecies
Number of species including electrons.
Definition: cpp_sml.hpp:42
int sheath_mode
Type of sheath (0 is none)
Definition: cpp_sml.hpp:37
double dpot_te_limit
Max absolute value of dpot/temp in getf0.
Definition: cpp_sml.hpp:81
bool electron_on
Use kinetic electrons.
Definition: cpp_sml.hpp:49
int mstep
Max number of time steps.
Definition: cpp_sml.hpp:47
bool limit_marker_den
Whether to limit marker density.
Definition: cpp_sml.hpp:52
double dt
Time step.
Definition: cpp_sml.hpp:35
bool initial_flow
Initial flow.
Definition: cpp_sml.hpp:79
int bounce
Type of bounce boundary condition (0 is none)
Definition: cpp_sml.hpp:32
bool neutrals
Toggle for using neutrals.
Definition: cpp_sml.hpp:41
bool ptb_3db_on
Toggle for ptb_3db.
Definition: cpp_sml.hpp:39
double bounce_buffer
Adds a buffer between the outer simulation boundary and the bounce surface.
Definition: cpp_sml.hpp:34
bool coupling_on
Whether coupling is on.
Definition: cpp_sml.hpp:50