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 
13 #include <string>
14 
19 struct MediumForEM {
20  enum {
21  Vacuum = 0,
22  Macroscopic = 1
23  };
24 };
25 
29 struct EvolveScheme {
30  enum {
31  Explicit = 0,
34  };
35 };
36 
44  enum {
46  LaxWendroff = 1
47  };
48 };
49 
50 struct GridType {
51  enum {
53  Staggered = 1,
54  Hybrid = 2
55  };
56 };
57 
58 enum struct PatchType
59 {
60  fine,
61  coarse
62 };
63 
65  enum {
66  None = 0,
67  Yee = 1,
68  CKC = 2,
69  PSATD = 3,
70  ECT = 4,
71  HybridPIC = 5
72  };
73 };
74 
76  enum {
77  None = 0,
80  LabFrame = 3 // Non relativistic
81  };
82 };
83 
85  enum {
86  Multigrid = 1,
88  };
89 };
90 
92  enum {
93  Boris = 0,
94  Vay = 1,
95  HigueraCary = 2
96  };
97 };
98 
100  enum {
102  Direct = 1,
103  Vay = 2,
104  Villasenor = 3
105  };
106 };
107 
109  // Only the Standard algorithm is implemented
110  enum {
111  Standard = 0
112  };
113 };
114 
116  enum {
119  };
120 };
121 
123  enum {
125  SecondOrder = 1
126  };
127 };
128 
129 struct JInTime {
130  enum {
131  Constant = 0,
132  Linear = 1
133  };
134 };
135 
136 struct RhoInTime {
137  enum {
138  Constant = 0,
139  Linear = 1
140  };
141 };
142 
146  enum {
147  Timers = 0,
148  Heuristic = 1
150  };
151 };
152 
155 enum struct FieldBoundaryType {
156  PML = 0,
157  Periodic = 1,
158  PEC = 2,
159  PMC = 3,
160  Damped = 4, // Fields in the guard cells are damped for PSATD
161  //in the moving window direction
162  Absorbing_SilverMueller = 5, // Silver-Mueller boundary condition
163  Neumann = 6, // For electrostatic, the normal E is set to zero
164  None = 7, // The fields values at the boundary are not updated. This is
165  // useful for RZ simulations, at r=0.
166  Open = 8 // Used in the Integrated Green Function Poisson solver
167  // Note that the solver implicitely assumes open BCs:
168  // no need to enforce them separately
169 };
170 
173 enum struct ParticleBoundaryType {
174  Absorbing = 0,
175  Open = 1,
176  Reflecting = 2,
177  Periodic = 3,
178  Thermal = 4
179 };
180 
184  enum {
185  Maximum = 0,
186  Minimum = 1,
187  Sum = 2
188  };
189 };
190 
191 int
192 GetAlgorithmInteger(const amrex::ParmParse& pp, const char* pp_search_key );
193 
198 GetFieldBCTypeInteger( std::string BCType );
199 
203 GetParticleBCTypeInteger( std::string BCType );
204 
207 std::string
209 
210 #endif // WARPX_UTILS_WARPXALGORITHMSELECTION_H_
int GetAlgorithmInteger(const amrex::ParmParse &pp, const char *pp_search_key)
Definition: WarpXAlgorithmSelection.cpp:155
ParticleBoundaryType GetParticleBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:243
FieldBoundaryType
Definition: WarpXAlgorithmSelection.H:155
@ PMC
perfect magnetic conductor (PMC) with B_tangential=0
ParticleBoundaryType
Definition: WarpXAlgorithmSelection.H:173
@ Absorbing
particles crossing domain boundary are removed
@ Reflecting
particles are reflected
PatchType
Definition: WarpXAlgorithmSelection.H:59
FieldBoundaryType GetFieldBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:226
std::string GetFieldBCTypeString(FieldBoundaryType fb_type)
Definition: WarpXAlgorithmSelection.cpp:260
Definition: PML.H:137
Definition: WarpX_PEC.H:15
Definition: WarpXAlgorithmSelection.H:108
@ Standard
Definition: WarpXAlgorithmSelection.H:111
Definition: WarpXAlgorithmSelection.H:99
@ Vay
Definition: WarpXAlgorithmSelection.H:103
@ Direct
Definition: WarpXAlgorithmSelection.H:102
@ Villasenor
Definition: WarpXAlgorithmSelection.H:104
@ Esirkepov
Definition: WarpXAlgorithmSelection.H:101
Definition: WarpXAlgorithmSelection.H:64
@ Yee
Definition: WarpXAlgorithmSelection.H:67
@ HybridPIC
Definition: WarpXAlgorithmSelection.H:71
@ CKC
Definition: WarpXAlgorithmSelection.H:68
@ ECT
Definition: WarpXAlgorithmSelection.H:70
@ None
Definition: WarpXAlgorithmSelection.H:66
@ PSATD
Definition: WarpXAlgorithmSelection.H:69
Definition: WarpXAlgorithmSelection.H:75
@ LabFrameElectroMagnetostatic
Definition: WarpXAlgorithmSelection.H:79
@ Relativistic
Definition: WarpXAlgorithmSelection.H:78
@ LabFrame
Definition: WarpXAlgorithmSelection.H:80
@ None
Definition: WarpXAlgorithmSelection.H:77
struct to select the overall evolve scheme
Definition: WarpXAlgorithmSelection.H:29
@ SemiImplicitPicard
Definition: WarpXAlgorithmSelection.H:33
@ Explicit
Definition: WarpXAlgorithmSelection.H:31
@ ImplicitPicard
Definition: WarpXAlgorithmSelection.H:32
Definition: WarpXAlgorithmSelection.H:115
@ MomentumConserving
Definition: WarpXAlgorithmSelection.H:118
@ EnergyConserving
Definition: WarpXAlgorithmSelection.H:117
Definition: WarpXAlgorithmSelection.H:50
@ Staggered
Definition: WarpXAlgorithmSelection.H:53
@ Collocated
Definition: WarpXAlgorithmSelection.H:52
@ Hybrid
Definition: WarpXAlgorithmSelection.H:54
Definition: WarpXAlgorithmSelection.H:129
@ Linear
Definition: WarpXAlgorithmSelection.H:132
@ Constant
Definition: WarpXAlgorithmSelection.H:131
Definition: WarpXAlgorithmSelection.H:145
@ Timers
load balance according to in-code timer-based weights (i.e., with costs)
Definition: WarpXAlgorithmSelection.H:147
@ Heuristic
Definition: WarpXAlgorithmSelection.H:148
struct to select algorithm for macroscopic Maxwell solver LaxWendroff (semi-implicit) represents sigm...
Definition: WarpXAlgorithmSelection.H:43
@ BackwardEuler
Definition: WarpXAlgorithmSelection.H:45
@ LaxWendroff
Definition: WarpXAlgorithmSelection.H:46
struct to determine the computational medium, i.e., vacuum or material/macroscopic default is vacuum.
Definition: WarpXAlgorithmSelection.H:19
@ Macroscopic
Definition: WarpXAlgorithmSelection.H:22
@ Vacuum
Definition: WarpXAlgorithmSelection.H:21
Definition: WarpXAlgorithmSelection.H:122
@ SecondOrder
Definition: WarpXAlgorithmSelection.H:125
@ FirstOrder
Definition: WarpXAlgorithmSelection.H:124
Definition: WarpXAlgorithmSelection.H:91
@ HigueraCary
Definition: WarpXAlgorithmSelection.H:95
@ Boris
Definition: WarpXAlgorithmSelection.H:93
@ Vay
Definition: WarpXAlgorithmSelection.H:94
Definition: WarpXAlgorithmSelection.H:84
@ IntegratedGreenFunction
Definition: WarpXAlgorithmSelection.H:87
@ Multigrid
Definition: WarpXAlgorithmSelection.H:86
Definition: WarpXAlgorithmSelection.H:183
@ Maximum
Definition: WarpXAlgorithmSelection.H:185
@ Sum
Definition: WarpXAlgorithmSelection.H:187
@ Minimum
Definition: WarpXAlgorithmSelection.H:186
Definition: WarpXAlgorithmSelection.H:136
@ Linear
Definition: WarpXAlgorithmSelection.H:139
@ Constant
Definition: WarpXAlgorithmSelection.H:138