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 UTILS_WARPXALGORITHMSELECTION_H_
9 #define UTILS_WARPXALGORITHMSELECTION_H_
10 
11 #include <AMReX_BaseFwd.H>
12 
13 #include <string>
14 
19 struct MediumForEM {
20  enum {
21  Vacuum = 0,
23  };
24 };
25 
33  enum {
34  BackwardEuler = 0,
35  LaxWendroff = 1
36  };
37 };
38 
39 struct GridType {
40  enum {
41  Collocated = 0,
42  Staggered = 1,
43  Hybrid = 2
44  };
45 };
46 
48  enum {
49  None = 0,
50  Yee = 1,
51  CKC = 2,
52  PSATD = 3,
53  ECT = 4
54  };
55 };
56 
58  enum {
59  None = 0,
60  Relativistic = 1,
61  LabFrameElectroMagnetostatic = 2,
62  LabFrame = 3 // Non relativistic
63  };
64 };
65 
67  enum {
68  Boris = 0,
69  Vay = 1,
70  HigueraCary = 2
71  };
72 };
73 
75  enum {
76  Esirkepov = 0,
77  Direct = 1,
78  Vay = 2
79  };
80 };
81 
83  // Only the Standard algorithm is implemented
84  enum {
85  Standard = 0
86  };
87 };
88 
89 struct GatheringAlgo {
90  enum {
91  EnergyConserving = 0,
92  MomentumConserving
93  };
94 };
95 
97  enum {
98  FirstOrder = 0,
99  SecondOrder = 1
100  };
101 };
102 
103 struct JInTime {
104  enum {
105  Constant = 0,
106  Linear = 1
107  };
108 };
109 
110 struct RhoInTime {
111  enum {
112  Constant = 0,
113  Linear = 1
114  };
115 };
116 
120  enum {
121  Timers = 0,
122  Heuristic = 1,
124  GpuClock = 2
125  };
126 };
127 
131  enum {
132  PML = 0,
133  Periodic = 1,
134  PEC = 2,
135  PMC = 3,
136  Damped = 4, // Fields in the guard cells are damped for PSATD
137  //in the moving window direction
138  Absorbing_SilverMueller = 5, // Silver-Mueller boundary condition
139  Neumann = 6, // For electrostatic, the normal E is set to zero
140  None = 7 // The fields values at the boundary are not updated. This is
141  // useful for RZ simulations, at r=0.
142  };
143 };
144 
147 enum struct ParticleBoundaryType {
148  Absorbing = 0,
149  Open = 1,
150  Reflecting = 2,
151  Periodic = 3
152 };
153 
157  enum {
158  Maximum = 0,
159  Minimum = 1,
160  Sum = 2
161  };
162 };
163 
164 int
165 GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key );
166 
170 int
171 GetFieldBCTypeInteger( std::string BCType );
172 
176 GetParticleBCTypeInteger( std::string BCType );
177 
178 #endif // UTILS_WARPXALGORITHMSELECTION_H_
Definition: WarpXAlgorithmSelection.H:39
Definition: WarpXAlgorithmSelection.H:119
void Sum(T &v, MPI_Comm comm)
particles are reflected
particles cross domain boundary leave with damped j
Definition: WarpXAlgorithmSelection.H:66
Definition: WarpXAlgorithmSelection.H:103
Definition: WarpXAlgorithmSelection.H:89
int GetAlgorithmInteger(amrex::ParmParse &pp, const char *pp_search_key)
Definition: WarpXAlgorithmSelection.cpp:138
particles crossing domain boundary are removed
Definition: WarpXAlgorithmSelection.H:21
Definition: WarpXAlgorithmSelection.H:130
int GetFieldBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:202
Definition: WarpXAlgorithmSelection.H:82
Definition: WarpXAlgorithmSelection.H:156
struct to select algorithm for macroscopic Maxwell solver LaxWendroff (semi-implicit) represents sigm...
Definition: WarpXAlgorithmSelection.H:32
struct to determine the computational medium, i.e., vacuum or material/macroscopic default is vacuum...
Definition: WarpXAlgorithmSelection.H:19
Definition: WarpXAlgorithmSelection.H:47
Definition: PML.H:127
Definition: WarpXAlgorithmSelection.H:57
Definition: WarpXAlgorithmSelection.H:74
Definition: WarpXAlgorithmSelection.H:22
Definition: WarpX_PEC.H:20
Definition: WarpXAlgorithmSelection.H:110
ParticleBoundaryType
Definition: WarpXAlgorithmSelection.H:147
Definition: WarpXAlgorithmSelection.H:96
ParticleBoundaryType GetParticleBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:219