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 
40  enum {
41  Yee = 0,
42  CKC = 1,
43  PSATD = 2,
44  ECT = 3
45  };
46 };
47 
49  enum {
50  None = 0,
51  Relativistic = 1,
52  LabFrame = 2
53  };
54 };
55 
57  enum {
58  Boris = 0,
59  Vay = 1,
60  HigueraCary = 2
61  };
62 };
63 
65  enum {
66  Esirkepov = 0,
67  Direct = 1,
68  Vay = 2
69  };
70 };
71 
73  // Only the Standard algorithm is implemented
74  enum {
75  Standard = 0
76  };
77 };
78 
79 struct GatheringAlgo {
80  enum {
81  EnergyConserving = 0,
82  MomentumConserving
83  };
84 };
85 
86 struct JInTime {
87  enum {
88  Constant = 0,
89  Linear = 1
90  };
91 };
92 
93 struct RhoInTime {
94  enum {
95  Linear = 1,
96  Quadratic = 2
97  };
98 };
99 
103  enum {
104  Timers = 0,
105  Heuristic = 1,
107  GpuClock = 2
108  };
109 };
110 
114  enum {
115  PML = 0,
116  Periodic = 1,
117  PEC = 2,
118  PMC = 3,
119  Damped = 4, // Fields in the guard cells are damped for PSATD
120  //in the moving window direction
121  Absorbing_SilverMueller = 5, // Silver-Mueller boundary condition
122  Neumann = 6, // For electrostatic, the normal E is set to zero
123  None = 7 // The fields values at the boundary are not updated. This is
124  // useful for RZ simulations, at r=0.
125  };
126 };
127 
130 enum struct ParticleBoundaryType {
131  Absorbing = 0,
132  Open = 1,
133  Reflecting = 2,
134  Periodic = 3
135 };
136 
140  enum {
141  Maximum = 0,
142  Minimum = 1,
143  Sum = 2
144  };
145 };
146 
147 int
148 GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key );
149 
153 int
154 GetFieldBCTypeInteger( std::string BCType );
155 
159 GetParticleBCTypeInteger( std::string BCType );
160 
161 #endif // UTILS_WARPXALGORITHMSELECTION_H_
Definition: WarpXAlgorithmSelection.H:102
void Sum(T &v, MPI_Comm comm)
particles are reflected
particles cross domain boundary leave with damped j
Definition: WarpXAlgorithmSelection.H:56
Definition: WarpXAlgorithmSelection.H:86
Definition: WarpXAlgorithmSelection.H:79
Definition: GetExternalFields.H:16
int GetAlgorithmInteger(amrex::ParmParse &pp, const char *pp_search_key)
Definition: WarpXAlgorithmSelection.cpp:123
Definition: GetExternalFields.H:16
Definition: WarpXAlgorithmSelection.H:39
particles crossing domain boundary are removed
Definition: WarpXAlgorithmSelection.H:21
Definition: WarpXAlgorithmSelection.H:113
int GetFieldBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:183
Definition: WarpXAlgorithmSelection.H:72
Definition: WarpXAlgorithmSelection.H:139
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: PML.H:125
Definition: WarpXAlgorithmSelection.H:48
Definition: WarpXAlgorithmSelection.H:64
Definition: WarpXAlgorithmSelection.H:22
Definition: WarpX_PEC.H:20
Definition: WarpXAlgorithmSelection.H:93
ParticleBoundaryType
Definition: WarpXAlgorithmSelection.H:130
ParticleBoundaryType GetParticleBCTypeInteger(std::string BCType)
Definition: WarpXAlgorithmSelection.cpp:200