WarpX
WarpXAlgorithmSelection.H
Go to the documentation of this file.
1 /* Copyright 2019 David Grote, Luca Fedeli, Remi Lehe
2  * Yinjian Zhao
3  *
4  * This file is part of WarpX.
5  *
6  * License: BSD-3-Clause-LBNL
7  */
8 #ifndef WARPX_UTILS_WARPXALGORITHMSELECTION_H_
9 #define WARPX_UTILS_WARPXALGORITHMSELECTION_H_
10 
11 #include <AMReX_BaseFwd.H>
12 #include <ablastr/utils/Enums.H>
13 
14 #include <string>
15 
16 using namespace ablastr::utils::enums; // NOLINT(google-global-names-in-headers)
17 
18 
23 struct MediumForEM {
24  enum {
25  Vacuum = 0,
26  Macroscopic = 1
27  };
28 };
29 
33 struct EvolveScheme {
34  enum {
35  Explicit = 0,
37  SemiImplicitEM = 2
38  };
39 };
40 
48  enum {
49  BackwardEuler = 0,
50  LaxWendroff = 1
51  };
52 };
53 
55  enum {
56  None = 0,
57  Yee = 1,
58  CKC = 2,
59  PSATD = 3,
60  ECT = 4,
61  HybridPIC = 5
62  };
63 };
64 
66  enum {
67  None = 0,
68  Relativistic = 1,
69  LabFrameElectroMagnetostatic = 2,
70  LabFrame = 3 // Non relativistic
71  };
72 };
73 
75  enum {
76  Multigrid = 1,
77  IntegratedGreenFunction = 2,
78  };
79 };
80 
82  enum {
83  Boris = 0,
84  Vay = 1,
85  HigueraCary = 2
86  };
87 };
88 
90  enum {
91  Esirkepov = 0,
92  Direct = 1,
93  Vay = 2,
94  Villasenor = 3
95  };
96 };
97 
99  // Only the Standard algorithm is implemented
100  enum {
101  Standard = 0
102  };
103 };
104 
106  enum {
107  EnergyConserving = 0,
108  MomentumConserving
109  };
110 };
111 
113  enum {
114  FirstOrder = 0,
115  SecondOrder = 1
116  };
117 };
118 
119 struct JInTime {
120  enum {
121  Constant = 0,
122  Linear = 1
123  };
124 };
125 
126 struct RhoInTime {
127  enum {
128  Constant = 0,
129  Linear = 1
130  };
131 };
132 
136  enum {
137  Timers = 0,
138  Heuristic = 1
140  };
141 };
142 
145 enum struct FieldBoundaryType {
146  PML = 0,
147  Periodic = 1,
148  PEC = 2,
149  PMC = 3,
150  Damped = 4, // Fields in the guard cells are damped for PSATD
151  //in the moving window direction
152  Absorbing_SilverMueller = 5, // Silver-Mueller boundary condition
153  Neumann = 6, // For electrostatic, the normal E is set to zero
154  None = 7, // The fields values at the boundary are not updated. This is
155  // useful for RZ simulations, at r=0.
156  Open = 8 // Used in the Integrated Green Function Poisson solver
157  // Note that the solver implicitely assumes open BCs:
158  // no need to enforce them separately
159 };
160 
163 enum struct ParticleBoundaryType {
164  Absorbing = 0,
165  Open = 1,
166  Reflecting = 2,
167  Periodic = 3,
168  Thermal = 4,
169  None = 5
170 };
171 
175  enum {
176  Maximum = 0,
177  Minimum = 1,
178  Sum = 2
179  };
180 };
181 
182 int
183 GetAlgorithmInteger(const amrex::ParmParse& pp, const char* pp_search_key );
184 
189 GetFieldBCTypeInteger( std::string BCType );
190 
194 GetParticleBCTypeInteger( std::string BCType );
195 
198 std::string
200 
201 #endif // WARPX_UTILS_WARPXALGORITHMSELECTION_H_
int GetAlgorithmInteger(const amrex::ParmParse &pp, const char *pp_search_key)
Definition: WarpXAlgorithmSelection.cpp:157
ParticleBoundaryType GetParticleBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:245
FieldBoundaryType
Definition: WarpXAlgorithmSelection.H:145
@ PMC
perfect magnetic conductor (PMC) with B_tangential=0
ParticleBoundaryType
Definition: WarpXAlgorithmSelection.H:163
@ Absorbing
particles crossing domain boundary are removed
@ Reflecting
particles are reflected
FieldBoundaryType GetFieldBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:228
std::string GetFieldBCTypeString(FieldBoundaryType fb_type)
Definition: WarpXAlgorithmSelection.cpp:262
Definition: PML.H:137
Definition: SemiImplicitEM.H:43
Definition: ThetaImplicitEM.H:54
Definition: WarpX_PEC.H:15
Definition: Enums.H:12
void Sum(T &v, MPI_Comm comm)
Definition: WarpXAlgorithmSelection.H:98
Definition: WarpXAlgorithmSelection.H:89
Definition: WarpXAlgorithmSelection.H:54
Definition: WarpXAlgorithmSelection.H:65
struct to select the overall evolve scheme
Definition: WarpXAlgorithmSelection.H:33
Definition: WarpXAlgorithmSelection.H:105
Definition: WarpXAlgorithmSelection.H:119
Definition: WarpXAlgorithmSelection.H:135
struct to select algorithm for macroscopic Maxwell solver LaxWendroff (semi-implicit) represents sigm...
Definition: WarpXAlgorithmSelection.H:47
struct to determine the computational medium, i.e., vacuum or material/macroscopic default is vacuum.
Definition: WarpXAlgorithmSelection.H:23
Definition: WarpXAlgorithmSelection.H:112
Definition: WarpXAlgorithmSelection.H:81
Definition: WarpXAlgorithmSelection.H:74
Definition: WarpXAlgorithmSelection.H:174
Definition: WarpXAlgorithmSelection.H:126