aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> 2022-01-04 09:41:44 -0800
committerGravatar GitHub <noreply@github.com> 2022-01-04 09:41:44 -0800
commitf08f12835397b9cc05aa4a18fe2f22803501e08d (patch)
tree32ea0bf724d2726bd504ee8044a0428c8ce0a848 /Source/WarpX.cpp
parentce851bb9749004dedadf5d41f96c0f0069fedd98 (diff)
downloadWarpX-f08f12835397b9cc05aa4a18fe2f22803501e08d.tar.gz
WarpX-f08f12835397b9cc05aa4a18fe2f22803501e08d.tar.zst
WarpX-f08f12835397b9cc05aa4a18fe2f22803501e08d.zip
Allow Dirichlet BCs on r boundaries in RZ (electrostatic) (#2714)
* allow Dirichlet BCs in r when r_min != 0 with ES RZ simulations * handle the rmax boundary condition setting properly when rmin == 0 * add ability to specify rmin and rmax potentials through picmi
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index 585369d70..c30eb79d1 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -891,6 +891,13 @@ WarpX::ReadParameters ()
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(Geom(0).isPeriodic(0) == 0,
"The problem must not be periodic in the radial direction");
+ // Ensure code aborts if PEC is specified at r=0 for RZ
+ if (Geom(0).ProbLo(0) == 0){
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WarpX::field_boundary_lo[0] == FieldBoundaryType::None,
+ "Error : Field boundary at r=0 must be ``none``. \n");
+ }
+
if (maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
// Force do_nodal=true (that is, not staggered) and
// use same shape factors in all directions, for gathering