All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Go to the documentation of this file.
1 #ifndef SML_HPP
2 #define SML_HPP
3 #include "space_settings.hpp"
4 #include "NamelistReader.hpp"
6 // Simulation class
7 template<class Device>
8 class Simulation {
9  public:
11  // Constructor
12  Simulation(NLReader::NamelistReader& nlr, int bounce_in, double dt_in,
13  bool ptb_3db_on_in, bool neutrals_in, int nspecies_in,
14  double bounce_buffer_in, bool deltaf_in, bool xz_00_up_in,
15  bool exclude_private_in, int nthreads_in , double f0_1_Ln_in, double f0_1_Lt_e_in);
17  // "Null constructor"
20  // Input parameters
21  int bounce;
23  double bounce_buffer;
24  double dt;
28  bool ptb_3db_on;
29  bool drift_on;
30  bool neutrals;
31  int nspecies;
32  bool diag_heat_on;
33  bool deltaf;
34  bool xz_00_up;
35  int mstep;
36  int nrk;
37  bool electron_on;
38  bool coupling_on;
39  bool f0_grid;
41  int special;
42  int nthreads;
46  bool field_solver_on=true;
47 #ifdef DELTAF_CONV
48  bool dwdt_fix_bg; // 1-w factor in dwdt
49  bool dwdt_exb_only; // excluding grad-b drift in dwdt
50  int deltaf_f0_mode; // -2 for self-consistent gradient, -1 for vertual constant gradient
51  double f0_1_Ln, f0_1_Lt_e ; // vertual constant gradient input
52 #endif
53 #ifdef EXPLICIT_EM
54  bool em_mixed_variable;
55  bool em_control_variate;
56  int em_pullback_mode;
62  bool em_control_variate_final_cv; // Should be local variable/argument
63  bool em_control_variate_flag; // Should be local variable/argument
64  int em_control_variate_niter;
65 #ifdef EM_B_PARA_EFF
66  bool em_b_para_eff;
67 #endif
68 #endif
71  // Used in collisions
74  // Used in getf0
75  bool initial_flow;
77  double dpot_te_limit;
79  // Used in update_f0
80  bool no_fp_in_f;
82  double f0_grid_alpha;
90  // Resampling
91  bool resamp_on;
95  // marker setup
111  // Simulation variables
112  double time;
113  int gstep;
114  int ipc;
116 };
118 #include "sml.tpp"
119 #endif
bool resamp_for_final_restart_write
Perform resampling before dumping the final restart file.
Definition: sml.hpp:92
double f0_grid_alpha
Definition: sml.hpp:82
double flat_marker_width2
Definition: sml.hpp:106
double flat_marker_decay_start1
Definition: sml.hpp:101
double initial_deltaf_noise
Definition: sml.hpp:107
bool drift_on
Toggle for using drift.
Definition: sml.hpp:29
int nrk
Order of Runge-Kutta time integration of particles + fields.
Definition: sml.hpp:36
Definition: sml.hpp:8
int f_source_period
Frequency of collisions.
Definition: sml.hpp:72
double low_mu_fill_population
Definition: sml.hpp:109
Definition: NamelistReader.hpp:163
bool exclude_private
Whether to exclude private region in ion charge deposition.
Definition: sml.hpp:69
int bounce_zero_weight
Whether to zero out weight at bounce.
Definition: sml.hpp:22
Definition: sml.hpp:18
double flat_marker_decay_start2
Definition: sml.hpp:102
int gstep
Current time step.
Definition: sml.hpp:113
bool diag_heat_on
Use heat diagnostics in sheath.
Definition: sml.hpp:32
bool xz_00_up
Use upper region of xz when obtaining 00 mode.
Definition: sml.hpp:34
bool update_poisson_solver
Whether poisson solver is updated.
Definition: sml.hpp:76
double flat_marker_cutoff1
Definition: sml.hpp:103
bool field_solver_on
If false, charge deposition and field solve is skipped.
Definition: sml.hpp:46
int f0_grid_alpha_start
Definition: sml.hpp:86
double marker_temp_factor3
Definition: sml.hpp:100
int nthreads
Number of OMP threads on the host.
Definition: sml.hpp:42
double marker_temp_factor
Definition: sml.hpp:98
int restart_write_period
How many steps between restart writes.
Definition: sml.hpp:44
int ncycle_half
Half the number of subcycles.
Definition: sml.hpp:25
bool deltaf
Whether some species is deltaf.
Definition: sml.hpp:33
bool flat_marker
Definition: sml.hpp:97
int ipc
RK2 loop index.
Definition: sml.hpp:114
bool sheath_adjust
Whether to adjust the sheath.
Definition: sml.hpp:27
bool resamp_on
Do resampling.
Definition: sml.hpp:91
double marker_min_temp
Definition: sml.hpp:108
double flat_marker_width1
Definition: sml.hpp:105
int special
Special run (eg single particle, poincare)
Definition: sml.hpp:41
double time
Current simulation time.
Definition: sml.hpp:112
bool no_fp_in_f
Definition: sml.hpp:80
bool f0_grid
Whether to use f0 grid.
Definition: sml.hpp:39
int nspecies
Number of species including electrons.
Definition: sml.hpp:31
double flat_marker_cutoff2
Definition: sml.hpp:104
int sheath_mode
Type of sheath (0 is none)
Definition: sml.hpp:26
double dpot_te_limit
Max absolute value of dpot/temp in getf0.
Definition: sml.hpp:77
bool electron_on
Use kinetic electrons.
Definition: sml.hpp:37
int mstep
Max number of time steps.
Definition: sml.hpp:35
bool field_aligned_initial
Definition: sml.hpp:96
bool limit_marker_den
Whether to limit marker density.
Definition: sml.hpp:40
double dt
Time step.
Definition: sml.hpp:24
bool initial_flow
Initial flow.
Definition: sml.hpp:75
int bounce
Type of bounce boundary condition (0 is none)
Definition: sml.hpp:21
bool neutrals
Toggle for using neutrals.
Definition: sml.hpp:30
double marker_temp_factor2
Definition: sml.hpp:99
bool ptb_3db_on
Toggle for ptb_3db.
Definition: sml.hpp:28
double bounce_buffer
Adds a buffer between the outer simulation boundary and the bounce surface.
Definition: sml.hpp:23
bool resamp_restart_read
Whether to read a restart file written from a simulation with different grid.
Definition: sml.hpp:93
bool coupling_on
Whether coupling is on.
Definition: sml.hpp:38