aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs/source/usage/parameters.rst21
-rw-r--r--Examples/Modules/ParticleBoundaryProcess/inputs_absorption6
-rw-r--r--Examples/Modules/RigidInjection/inputs_2d_BoostedFrame7
-rw-r--r--Examples/Modules/RigidInjection/inputs_2d_LabFrame7
-rw-r--r--Examples/Modules/boosted_diags/inputs_3d_slice5
-rw-r--r--Examples/Modules/dive_cleaning/inputs_3d5
-rw-r--r--Examples/Modules/embedded_boundary_cube/inputs_3d5
-rw-r--r--Examples/Modules/ionization/inputs_2d_bf_rt5
-rw-r--r--Examples/Modules/ionization/inputs_2d_rt5
-rw-r--r--Examples/Modules/laser_injection/inputs_2d_rt6
-rw-r--r--Examples/Modules/laser_injection/inputs_3d_rt6
-rw-r--r--Examples/Modules/laser_injection_from_file/inputs.2d_test_txye7
-rw-r--r--Examples/Modules/nci_corrector/inputs_2d6
-rw-r--r--Examples/Modules/qed/breit_wheeler/inputs_2d8
-rw-r--r--Examples/Modules/qed/breit_wheeler/inputs_3d8
-rw-r--r--Examples/Modules/qed/quantum_synchrotron/inputs_2d8
-rw-r--r--Examples/Modules/qed/quantum_synchrotron/inputs_3d8
-rw-r--r--Examples/Modules/qed/schwinger/inputs_3d_schwinger8
-rw-r--r--Examples/Modules/resampling/inputs_leveling_thinning5
-rw-r--r--Examples/Physics_applications/laser_acceleration/inputs_2d8
-rw-r--r--Examples/Physics_applications/laser_acceleration/inputs_2d_boost8
-rw-r--r--Examples/Physics_applications/laser_acceleration/inputs_2d_rz5
-rw-r--r--Examples/Physics_applications/laser_acceleration/inputs_3d8
-rw-r--r--Examples/Physics_applications/laser_ion/inputs5
-rw-r--r--Examples/Physics_applications/plasma_acceleration/inputs_2d11
-rw-r--r--Examples/Physics_applications/plasma_acceleration/inputs_2d_boost8
-rw-r--r--Examples/Physics_applications/plasma_acceleration/inputs_3d_boost8
-rw-r--r--Examples/Physics_applications/plasma_mirror/inputs_2d7
-rw-r--r--Examples/Physics_applications/uniform_plasma/inputs_2d7
-rw-r--r--Examples/Physics_applications/uniform_plasma/inputs_3d7
-rw-r--r--Examples/Tests/ElectrostaticSphere/inputs_3d4
-rw-r--r--Examples/Tests/ElectrostaticSphere/inputs_rz4
-rw-r--r--Examples/Tests/ElectrostaticSphereEB/inputs_3d1
-rw-r--r--Examples/Tests/Langmuir/inputs_2d_multi_rt6
-rw-r--r--Examples/Tests/Langmuir/inputs_2d_multi_rz_rt1
-rw-r--r--Examples/Tests/Langmuir/inputs_3d_multi_rt6
-rw-r--r--Examples/Tests/Larmor/inputs_2d_mr6
-rw-r--r--Examples/Tests/Maxwell_Hybrid_QED/inputs_2d8
-rw-r--r--Examples/Tests/PML/inputs_2d6
-rw-r--r--Examples/Tests/PML/inputs_3d6
-rw-r--r--Examples/Tests/SingleParticle/inputs_2d7
-rw-r--r--Examples/Tests/averaged_galilean/inputs_avg_2d8
-rw-r--r--Examples/Tests/averaged_galilean/inputs_avg_3d7
-rw-r--r--Examples/Tests/collision/inputs_2d8
-rw-r--r--Examples/Tests/collision/inputs_3d8
-rw-r--r--Examples/Tests/comoving/inputs_2d_hybrid8
-rw-r--r--Examples/Tests/divb_cleaning/inputs_3d5
-rw-r--r--Examples/Tests/galilean/inputs_2d7
-rw-r--r--Examples/Tests/galilean/inputs_2d_hybrid6
-rw-r--r--Examples/Tests/galilean/inputs_3d7
-rw-r--r--Examples/Tests/initial_distribution/inputs8
-rw-r--r--Examples/Tests/initial_plasma_profile/inputs8
-rw-r--r--Examples/Tests/laser_on_fine/inputs_2d6
-rw-r--r--Examples/Tests/multi_J/inputs_2d6
-rw-r--r--Examples/Tests/particle_pusher/inputs_3d6
-rw-r--r--Examples/Tests/particles_in_PML/inputs_2d6
-rw-r--r--Examples/Tests/particles_in_PML/inputs_3d6
-rw-r--r--Examples/Tests/particles_in_PML/inputs_mr_2d6
-rw-r--r--Examples/Tests/particles_in_PML/inputs_mr_3d6
-rw-r--r--Examples/Tests/photon_pusher/inputs_3d6
-rw-r--r--Examples/Tests/radiation_reaction/test_const_B_analytical/inputs_3d5
-rw-r--r--Examples/Tests/reduced_diags/inputs5
-rw-r--r--Examples/Tests/reduced_diags/inputs_loadbalancecosts5
-rw-r--r--Examples/Tests/restart/inputs8
-rw-r--r--Examples/Tests/subcycling/inputs_2d6
-rw-r--r--Regression/Checksum/benchmarks_json/PEC_particle.json42
-rw-r--r--Source/Initialization/WarpXInitData.cpp30
-rw-r--r--Source/Utils/WarpXUtil.cpp52
-rw-r--r--Source/WarpX.H6
69 files changed, 335 insertions, 225 deletions
diff --git a/Docs/source/usage/parameters.rst b/Docs/source/usage/parameters.rst
index 8fe63ae2b..99b9e259d 100644
--- a/Docs/source/usage/parameters.rst
+++ b/Docs/source/usage/parameters.rst
@@ -132,11 +132,6 @@ Setting up the field mesh
Note: in development; currently allowed value: ``2 2 2``.
-* ``geometry.is_periodic`` (`2 integers in 2D`, `3 integers in 3D`)
- Whether the boundary conditions are periodic, in each direction.
-
- For each direction, use 1 for periodic conditions, 0 otherwise.
-
* ``geometry.coord_sys`` (`integer`) optional (default `0`)
Coordinate system used by the simulation. 0 for Cartesian, 1 for cylindrical.
@@ -215,13 +210,13 @@ Setting up the field mesh
Domain Boundary Conditions
--------------------------
-* ``boundary.field_lo`` and ``boundary.field_hi`` (`2 strings` for 2D, `3 strings` for 3D)
+* ``boundary.field_lo`` and ``boundary.field_hi`` (`2 strings` for 2D, `3 strings` for 3D, `pml` by default)
Boundary conditions applied to field at the lower and upper domain boundaries. Depending on the type of boundary condition, the value for ``geometry.is_periodic`` will be set, overriding the user-input for the input parameter, ``geometry.is_periodic``. If not set, the default value for the fields at the domain boundary will be set to pml.
Options are:
* ``Periodic``: This option can be used to set periodic domain boundaries. Note that if the fields for lo in a certain dimension are set to periodic, then the corresponding upper boundary must also be set to periodic. If particle boundaries are not specified in the input file, then particles boundaries by default will be set to periodic. If particles boundaries are specified, then they must be set to periodic corresponding to the periodic field boundaries.
- * ``pml`` (default): This option can be used to add Perfectly Matched Layers (PML) around the simulation domain. It will override the user-defined value provided for ``warpx.do_pml``. See the :ref:`PML theory section <theory-bc>` for more details.
+ * ``pml`` (default): This option can be used to add Perfectly Matched Layers (PML) around the simulation domain. See the :ref:`PML theory section <theory-bc>` for more details.
Additional pml algorithms can be explored using the parameters ``warpx.do_pml_in_domain``, ``warpx.do_particles_in_pml``, and ``warpx.do_pml_j_damping``.
* ``absorbing_silver_mueller``: This option can be used to set the Silver-Mueller absorbing boundary conditions. These boundary conditions are simpler and less computationally expensive than the pml, but are also less effective at absorbing the field. They only work with the Yee Maxwell solver.
@@ -233,13 +228,16 @@ If an electrostatic field solve is used the boundary potentials can also be set
* ``none``: No boundary condition is applied to the fields. This option must be used for the RZ-solver at `r=0`.
-* ``boundary.particle_lo`` and ``boundary.particle_hi`` (`2 strings` for 2D, `3 strings` for 3D)
+* ``boundary.particle_lo`` and ``boundary.particle_hi`` (`2 strings` for 2D, `3 strings` for 3D, `absorbing` by default)
Options are:
+ * ``Absorbing``: Particles leaving the boundary will be deleted.
+
* ``Periodic``: Particles leaving the boundary will re-enter from the opposite boundary. The field boundary condition must be consistenly set to periodic and both lower and upper boundaries must be periodic.
+
* ``Reflecting``: Particles leaving the boundary are reflected from the boundary back into the domain. When
``boundary.reflect_all_velocities`` is false, the sign of only the normal velocity is changed, otherwise the sign of all velocities are changed.
-* ``boundary.reflect_all_velocities`` (`bool`) optional (default `false`)
+ * ``boundary.reflect_all_velocities`` (`bool`) optional (default `false`)
For a reflecting boundary condition, this flags whether the sign of only the normal velocity is changed or all velocities.
.. _running-cpp-parameters-eb:
@@ -1583,11 +1581,6 @@ Numerics and algorithms
Boundary conditions
-------------------
-* ``warpx.do_pml`` (`0` or `1`; default: 1)
- Whether to add Perfectly Matched Layers (PML) around the simulation box,
- and around the refinement patches.
- See the :ref:`PML theory section <theory-bc>` for more details.
-
* ``warpx.pml_ncell`` (`int`; default: 10)
The depth of the PML, in number of cells.
diff --git a/Examples/Modules/ParticleBoundaryProcess/inputs_absorption b/Examples/Modules/ParticleBoundaryProcess/inputs_absorption
index 25d41ff7b..5da6720ef 100644
--- a/Examples/Modules/ParticleBoundaryProcess/inputs_absorption
+++ b/Examples/Modules/ParticleBoundaryProcess/inputs_absorption
@@ -5,12 +5,14 @@ amr.max_level = 0
max_step = 60
geometry.coord_sys = 0
-geometry.is_periodic = 0 0 0
geometry.prob_lo = -125.e-6 -125.e-6 -149.e-6
geometry.prob_hi = 125.e-6 125.e-6 1.e-6
-warpx.do_pml = 0
warpx.cfl = 0.99
+# Domain Boundary condition
+boundary.field_lo = pec pec pec
+boundary.field_hi = pec pec pec
+
# Use parser to build EB
# Note that for amrex EB implicit function, >0 is covered, =0 is boundary and <0 is regular.
# This sets the region from -12.5e-6 < x < 12.5e-6, -12.5e-6 < y < 12.5e-6, -8.65e-6 < z < -6.15e-6 to be "covered"
diff --git a/Examples/Modules/RigidInjection/inputs_2d_BoostedFrame b/Examples/Modules/RigidInjection/inputs_2d_BoostedFrame
index 0713f0ef3..d9c0df13f 100644
--- a/Examples/Modules/RigidInjection/inputs_2d_BoostedFrame
+++ b/Examples/Modules/RigidInjection/inputs_2d_BoostedFrame
@@ -9,11 +9,14 @@ amr.max_grid_size = 512
amr.blocking_factor = 16
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 0 # Is periodic?
geometry.prob_lo = -50.e-6 -10.e-6
geometry.prob_hi = 50.e-6 0.e-6
+
+# Boundary condition
+boundary.field_lo = periodic pml
+boundary.field_hi = periodic pml
+
warpx.cfl = .999
-warpx.do_pml = 1
warpx.do_moving_window = 1
warpx.moving_window_dir = z
warpx.moving_window_v = 1.0 # in units of the speed of light
diff --git a/Examples/Modules/RigidInjection/inputs_2d_LabFrame b/Examples/Modules/RigidInjection/inputs_2d_LabFrame
index a444b9954..65abdb27d 100644
--- a/Examples/Modules/RigidInjection/inputs_2d_LabFrame
+++ b/Examples/Modules/RigidInjection/inputs_2d_LabFrame
@@ -4,11 +4,14 @@ amr.max_grid_size = 256
amr.blocking_factor = 16
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 0 # Is periodic?
geometry.prob_lo = -50.e-6 -10.e-6
geometry.prob_hi = 50.e-6 0.e-6
+
+# Boundary condition
+boundary.field_lo = periodic pml
+boundary.field_hi = periodic pml
+
warpx.cfl = .999
-warpx.do_pml = 1
warpx.do_moving_window = 1
warpx.moving_window_dir = z
warpx.moving_window_v = 1.0 # in units of the speed of light
diff --git a/Examples/Modules/boosted_diags/inputs_3d_slice b/Examples/Modules/boosted_diags/inputs_3d_slice
index d7c8b457f..680777336 100644
--- a/Examples/Modules/boosted_diags/inputs_3d_slice
+++ b/Examples/Modules/boosted_diags/inputs_3d_slice
@@ -13,10 +13,12 @@ my_constants.ymax = +128.e-6
my_constants.zmax = 0.96e-6
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 0 # Is periodic?
geometry.prob_lo = xmin ymin zmin
geometry.prob_hi = xmax ymax zmax
+boundary.field_lo = periodic periodic pec
+boundary.field_hi = periodic periodic pec
+
algo.current_deposition = esirkepov
algo.charge_deposition = standard
algo.field_gathering = energy-conserving
@@ -24,7 +26,6 @@ algo.particle_pusher = vay
algo.maxwell_solver = ckc
warpx.use_filter = 1
warpx.cfl = 1.
-warpx.do_pml = 0
# Order of particle shape factors
algo.particle_shape = 3
diff --git a/Examples/Modules/dive_cleaning/inputs_3d b/Examples/Modules/dive_cleaning/inputs_3d
index 92b34539a..1c8da5464 100644
--- a/Examples/Modules/dive_cleaning/inputs_3d
+++ b/Examples/Modules/dive_cleaning/inputs_3d
@@ -4,12 +4,13 @@ amr.max_grid_size = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 0 # Is periodic?
geometry.prob_lo = -50.e-6 -50.e-6 -50.e-6
geometry.prob_hi = 50.e-6 50.e-6 50.e-6
+boundary.field_lo = pml pml pml
+boundary.field_hi = pml pml pml
+
warpx.do_dive_cleaning = 1
-warpx.do_pml = 1
warpx.use_filter = 0
# Order of particle shape factors
diff --git a/Examples/Modules/embedded_boundary_cube/inputs_3d b/Examples/Modules/embedded_boundary_cube/inputs_3d
index e1bf83c95..7bdc25749 100644
--- a/Examples/Modules/embedded_boundary_cube/inputs_3d
+++ b/Examples/Modules/embedded_boundary_cube/inputs_3d
@@ -4,13 +4,14 @@ amr.max_grid_size = 128
amr.max_level = 0
geometry.coord_sys = 0
-geometry.is_periodic = 0 0 0
geometry.prob_lo = -0.8 -0.8 -0.8
geometry.prob_hi = 0.8 0.8 0.8
-warpx.do_pml = 0
warpx.const_dt = 1e-6
warpx.cfl = 1
+boundary.field_lo = pec pec pec
+boundary.field_hi = pec pec pec
+
eb2.geom_type = box
eb2.box_lo = -0.5 -0.5 -0.5
eb2.box_hi = 0.5 0.5 0.5
diff --git a/Examples/Modules/ionization/inputs_2d_bf_rt b/Examples/Modules/ionization/inputs_2d_bf_rt
index f1572da10..db4fe089c 100644
--- a/Examples/Modules/ionization/inputs_2d_bf_rt
+++ b/Examples/Modules/ionization/inputs_2d_bf_rt
@@ -3,13 +3,14 @@ amr.n_cell = 16 800
amr.max_grid_size = 64
amr.blocking_factor = 16
geometry.coord_sys = 0
-geometry.is_periodic = 1 0
geometry.prob_lo = -5.e-6 -40.e-6
geometry.prob_hi = 5.e-6 0.e-6
amr.max_level = 0
+boundary.field_lo = periodic pml
+boundary.field_hi = periodic pml
+
algo.maxwell_solver = ckc
-warpx.do_pml = 1
warpx.cfl = .999
warpx.do_moving_window = 1
warpx.moving_window_dir = z
diff --git a/Examples/Modules/ionization/inputs_2d_rt b/Examples/Modules/ionization/inputs_2d_rt
index 60402eae9..0549d19be 100644
--- a/Examples/Modules/ionization/inputs_2d_rt
+++ b/Examples/Modules/ionization/inputs_2d_rt
@@ -3,13 +3,14 @@ amr.n_cell = 16 800
amr.max_grid_size = 64
amr.blocking_factor = 16
geometry.coord_sys = 0
-geometry.is_periodic = 1 0
geometry.prob_lo = -5.e-6 0.e-6
geometry.prob_hi = 5.e-6 20.e-6
amr.max_level = 0
+boundary.field_lo = periodic pml
+boundary.field_hi = periodic pml
+
algo.maxwell_solver = ckc
-warpx.do_pml = 1
warpx.cfl = .999
warpx.use_filter = 0
diff --git a/Examples/Modules/laser_injection/inputs_2d_rt b/Examples/Modules/laser_injection/inputs_2d_rt
index 09d1209ef..534cd28ad 100644
--- a/Examples/Modules/laser_injection/inputs_2d_rt
+++ b/Examples/Modules/laser_injection/inputs_2d_rt
@@ -13,10 +13,12 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 1 # Is periodic?
geometry.prob_lo = -20.e-6 -15.e-6 # physical domain
geometry.prob_hi = 20.e-6 15.e-6
+boundary.field_lo = pec periodic
+boundary.field_hi = pec periodic
+
warpx.serialize_ics = 1
# Verbosity
@@ -52,8 +54,6 @@ diagnostics.diags_names = diag1
diag1.intervals = 240
diag1.diag_type = Full
-warpx.do_pml = 0
-
# Moving window
warpx.do_moving_window = 1
warpx.moving_window_dir = x
diff --git a/Examples/Modules/laser_injection/inputs_3d_rt b/Examples/Modules/laser_injection/inputs_3d_rt
index d2c9ee17a..839e467c8 100644
--- a/Examples/Modules/laser_injection/inputs_3d_rt
+++ b/Examples/Modules/laser_injection/inputs_3d_rt
@@ -13,17 +13,19 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 0 # Is periodic?
geometry.prob_lo = -20.e-6 -20.e-6 -12.e-6 # physical domain
geometry.prob_hi = 20.e-6 20.e-6 12.e-6
+# Boundary condition
+boundary.field_lo = periodic periodic pec
+boundary.field_hi = periodic periodic pec
+
warpx.serialize_ics = 1
# Verbosity
warpx.verbose = 1
# Algorithms
-warpx.do_pml = 0
warpx.use_filter = 0
# CFL
diff --git a/Examples/Modules/laser_injection_from_file/inputs.2d_test_txye b/Examples/Modules/laser_injection_from_file/inputs.2d_test_txye
index a8f3db773..72fdc2fb0 100644
--- a/Examples/Modules/laser_injection_from_file/inputs.2d_test_txye
+++ b/Examples/Modules/laser_injection_from_file/inputs.2d_test_txye
@@ -7,13 +7,18 @@ amr.max_grid_size = 512
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -25.e-6 -25.0e-6 # physical domain
geometry.prob_hi = 25.e-6 25.e-6
warpx.verbose = 1
warpx.serialize_ics = 1
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
warpx.cfl = 0.98
diff --git a/Examples/Modules/nci_corrector/inputs_2d b/Examples/Modules/nci_corrector/inputs_2d
index 78970b59e..6430d5d3e 100644
--- a/Examples/Modules/nci_corrector/inputs_2d
+++ b/Examples/Modules/nci_corrector/inputs_2d
@@ -14,13 +14,15 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 # Is periodic?
geometry.prob_lo = -20.e-6 -20.e-6
geometry.prob_hi = 20.e-6 20.e-6
+# Boundary condition
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
# Verbosity
warpx.use_filter = 1
-warpx.do_pml = 0
# Algorithms
algo.current_deposition = esirkepov
diff --git a/Examples/Modules/qed/breit_wheeler/inputs_2d b/Examples/Modules/qed/breit_wheeler/inputs_2d
index 26426f864..f0a241bf1 100644
--- a/Examples/Modules/qed/breit_wheeler/inputs_2d
+++ b/Examples/Modules/qed/breit_wheeler/inputs_2d
@@ -6,12 +6,17 @@ amr.n_cell = 32 32
amr.max_grid_size = 16 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 8 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -0.5e-6 -0.5e-6 # physical domain
geometry.prob_hi = 0.5e-6 0.5e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
algo.current_deposition = esirkepov
@@ -22,7 +27,6 @@ warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
warpx.serialize_ics = 1
# Order of particle shape factors
diff --git a/Examples/Modules/qed/breit_wheeler/inputs_3d b/Examples/Modules/qed/breit_wheeler/inputs_3d
index e31e2c536..e55989729 100644
--- a/Examples/Modules/qed/breit_wheeler/inputs_3d
+++ b/Examples/Modules/qed/breit_wheeler/inputs_3d
@@ -6,12 +6,17 @@ amr.n_cell = 16 16 16
amr.max_grid_size = 16 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 8 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -0.5e-6 -0.5e-6 -0.5e-6 # physical domain
geometry.prob_hi = 0.5e-6 0.5e-6 0.5e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
algo.current_deposition = esirkepov
@@ -22,7 +27,6 @@ warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
warpx.serialize_ics = 1
# Order of particle shape factors
diff --git a/Examples/Modules/qed/quantum_synchrotron/inputs_2d b/Examples/Modules/qed/quantum_synchrotron/inputs_2d
index c735bafd7..56cbf4c4b 100644
--- a/Examples/Modules/qed/quantum_synchrotron/inputs_2d
+++ b/Examples/Modules/qed/quantum_synchrotron/inputs_2d
@@ -6,12 +6,17 @@ amr.n_cell = 32 32
amr.max_grid_size = 16 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 8 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -0.25e-6 -0.25e-6 # physical domain
geometry.prob_hi = 0.25e-6 0.25e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
algo.current_deposition = esirkepov
@@ -22,7 +27,6 @@ warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
warpx.serialize_ics = 1
# Order of particle shape factors
diff --git a/Examples/Modules/qed/quantum_synchrotron/inputs_3d b/Examples/Modules/qed/quantum_synchrotron/inputs_3d
index e7a3c7175..e9ff2a8db 100644
--- a/Examples/Modules/qed/quantum_synchrotron/inputs_3d
+++ b/Examples/Modules/qed/quantum_synchrotron/inputs_3d
@@ -6,12 +6,17 @@ amr.n_cell = 16 16 16
amr.max_grid_size = 16 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 8 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -0.25e-6 -0.25e-6 -0.25e-6 # physical domain
geometry.prob_hi = 0.25e-6 0.25e-6 0.25e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
algo.current_deposition = esirkepov
@@ -22,7 +27,6 @@ warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
warpx.serialize_ics = 1
# Order of particle shape factors
diff --git a/Examples/Modules/qed/schwinger/inputs_3d_schwinger b/Examples/Modules/qed/schwinger/inputs_3d_schwinger
index fb1b98286..1f532eceb 100644
--- a/Examples/Modules/qed/schwinger/inputs_3d_schwinger
+++ b/Examples/Modules/qed/schwinger/inputs_3d_schwinger
@@ -6,12 +6,17 @@ amr.n_cell = 8 8 32
amr.max_grid_size = 16 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 8 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -5.e-7 -5.e-7 -5.e-7 # physical domain
geometry.prob_hi = 5.e-7 5.e-7 5.e-7
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
algo.current_deposition = esirkepov
@@ -20,7 +25,6 @@ algo.field_gathering = momentum-conserving
algo.particle_pusher = boris
warpx.verbose = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 0 # use Perfectly Matched Layer as boundary condition
warpx.serialize_ics = 1
warpx.use_filter = 0
diff --git a/Examples/Modules/resampling/inputs_leveling_thinning b/Examples/Modules/resampling/inputs_leveling_thinning
index e5de6b7f1..9990fd563 100644
--- a/Examples/Modules/resampling/inputs_leveling_thinning
+++ b/Examples/Modules/resampling/inputs_leveling_thinning
@@ -2,12 +2,13 @@ max_step = 8
amr.n_cell = 16 16
amr.blocking_factor = 8
amr.max_grid_size = 8
-geometry.is_periodic = 1 1
geometry.prob_lo = 0. 0.
geometry.prob_hi = 16. 16.
amr.max_level = 0
-warpx.do_pml = 0
+# Boundary condition
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
# Order of particle shape factors
algo.particle_shape = 1
diff --git a/Examples/Physics_applications/laser_acceleration/inputs_2d b/Examples/Physics_applications/laser_acceleration/inputs_2d
index afd6ea585..8917f5f05 100644
--- a/Examples/Physics_applications/laser_acceleration/inputs_2d
+++ b/Examples/Physics_applications/laser_acceleration/inputs_2d
@@ -6,7 +6,6 @@ amr.n_cell = 64 512
amr.max_grid_size = 64 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 32 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
geometry.prob_lo = -30.e-6 -56.e-6 # physical domain
geometry.prob_hi = 30.e-6 12.e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
@@ -14,13 +13,18 @@ amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not s
# warpx.fine_tag_hi = 5.e-6 -25.e-6
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
+
+#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
warpx.do_moving_window = 1
warpx.moving_window_dir = z # Only z is supported for the moment
warpx.moving_window_v = 1.0 # units of speed of light
diff --git a/Examples/Physics_applications/laser_acceleration/inputs_2d_boost b/Examples/Physics_applications/laser_acceleration/inputs_2d_boost
index 240c602bf..fa733880e 100644
--- a/Examples/Physics_applications/laser_acceleration/inputs_2d_boost
+++ b/Examples/Physics_applications/laser_acceleration/inputs_2d_boost
@@ -8,12 +8,17 @@ amr.max_grid_size = 64
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 0 # Is periodic?
# physical domain
geometry.prob_lo = -128.e-6 -40.e-6
geometry.prob_hi = 128.e-6 0.96e-6
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic pec
+boundary.field_hi = periodic pec
+
+#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
@@ -25,7 +30,6 @@ algo.particle_pusher = vay
algo.maxwell_solver = ckc
warpx.use_filter = 1
warpx.cfl = 1.
-warpx.do_pml = 0
# Moving window
warpx.do_moving_window = 1
warpx.moving_window_dir = z
diff --git a/Examples/Physics_applications/laser_acceleration/inputs_2d_rz b/Examples/Physics_applications/laser_acceleration/inputs_2d_rz
index 9b79634f8..718a96ee7 100644
--- a/Examples/Physics_applications/laser_acceleration/inputs_2d_rz
+++ b/Examples/Physics_applications/laser_acceleration/inputs_2d_rz
@@ -6,13 +6,15 @@ amr.n_cell = 64 512
amr.max_grid_size = 64 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 32 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 1 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
geometry.prob_lo = 0. -56.e-6 # physical domain
geometry.prob_hi = 30.e-6 12.e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
warpx.n_rz_azimuthal_modes = 2
+boundary.field_lo = none pec
+boundary.field_hi = pec pec
+
#################################
############ NUMERICS ###########
#################################
@@ -20,7 +22,6 @@ warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 0 # use Perfectly Matched Layer as boundary condition
warpx.do_moving_window = 1
warpx.moving_window_dir = z # Only z is supported for the moment
warpx.moving_window_v = 1.0 # units of speed of light
diff --git a/Examples/Physics_applications/laser_acceleration/inputs_3d b/Examples/Physics_applications/laser_acceleration/inputs_3d
index 1dd0b5253..249a54669 100644
--- a/Examples/Physics_applications/laser_acceleration/inputs_3d
+++ b/Examples/Physics_applications/laser_acceleration/inputs_3d
@@ -6,7 +6,6 @@ amr.n_cell = 64 64 512
amr.max_grid_size = 64 # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 32 # minimum size of each AMReX box, used to decompose the domain
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 0 # Is periodic?
geometry.prob_lo = -30.e-6 -30.e-6 -56.e-6 # physical domain
geometry.prob_hi = 30.e-6 30.e-6 12.e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
@@ -14,13 +13,18 @@ amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not s
# warpx.fine_tag_hi = 5.e-6 5.e-6 -30.e-6
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic pec
+boundary.field_hi = periodic periodic pec
+
+#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 0 # use Perfectly Matched Layer as boundary condition
warpx.do_moving_window = 1
warpx.moving_window_dir = z # Only z is supported for the moment
warpx.moving_window_v = 1.0 # units of speed of light
diff --git a/Examples/Physics_applications/laser_ion/inputs b/Examples/Physics_applications/laser_ion/inputs
index d69f55f87..8a8b18f66 100644
--- a/Examples/Physics_applications/laser_ion/inputs
+++ b/Examples/Physics_applications/laser_ion/inputs
@@ -25,7 +25,10 @@ amr.n_cell = 2688 3712
amr.max_level = 0
geometry.prob_lo = -7.5e-6 -5.e-6
geometry.prob_hi = 7.5e-6 25.e-6
-geometry.is_periodic = 0 0 # non-periodic (default)
+
+# Boundary condition
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
# Order of particle shape factors
algo.particle_shape = 3
diff --git a/Examples/Physics_applications/plasma_acceleration/inputs_2d b/Examples/Physics_applications/plasma_acceleration/inputs_2d
index 9aceea519..f25f3d7ff 100644
--- a/Examples/Physics_applications/plasma_acceleration/inputs_2d
+++ b/Examples/Physics_applications/plasma_acceleration/inputs_2d
@@ -7,19 +7,24 @@ amr.max_grid_size = 128
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
geometry.prob_lo = -125.e-6 -149.e-6
geometry.prob_hi = 125.e-6 1.e-6
warpx.fine_tag_lo = -12.e-6 -110.e-6
warpx.fine_tag_hi = 12.e-6 -100.e-6
#################################
+######## Boundary condition #####
+#################################
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
+# PML
+warpx.pml_ncell = 10
+
+#################################
############ NUMERICS ###########
#################################
algo.maxwell_solver = ckc
warpx.use_filter = 1
-warpx.do_pml = 1
-warpx.pml_ncell = 10
warpx.cfl = .99
warpx.do_moving_window = 1
warpx.moving_window_dir = z
diff --git a/Examples/Physics_applications/plasma_acceleration/inputs_2d_boost b/Examples/Physics_applications/plasma_acceleration/inputs_2d_boost
index 0277067fb..304da69c8 100644
--- a/Examples/Physics_applications/plasma_acceleration/inputs_2d_boost
+++ b/Examples/Physics_applications/plasma_acceleration/inputs_2d_boost
@@ -7,17 +7,21 @@ amr.max_grid_size = 128
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
geometry.prob_lo = -125.e-6 -149.e-6
geometry.prob_hi = 125.e-6 1.e-6
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
+
+#################################
############ NUMERICS ###########
#################################
algo.maxwell_solver = ckc
warpx.verbose = 1
warpx.use_filter = 1
-warpx.do_pml = 1
warpx.pml_ncell = 10
warpx.cfl = .99
warpx.do_moving_window = 1
diff --git a/Examples/Physics_applications/plasma_acceleration/inputs_3d_boost b/Examples/Physics_applications/plasma_acceleration/inputs_3d_boost
index 8ad4e3056..55f74cfcb 100644
--- a/Examples/Physics_applications/plasma_acceleration/inputs_3d_boost
+++ b/Examples/Physics_applications/plasma_acceleration/inputs_3d_boost
@@ -7,18 +7,22 @@ amr.max_grid_size = 64
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 0 # Is periodic?
geometry.prob_lo = -0.00015 -0.00015 -0.00012
geometry.prob_hi = 0.00015 0.00015 1.e-06
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic pml
+boundary.field_hi = periodic periodic pml
+
+#################################
############ NUMERICS ###########
#################################
algo.maxwell_solver = ckc
warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
-warpx.do_pml = 1
warpx.cfl = .99
warpx.do_moving_window = 1
warpx.moving_window_dir = z
diff --git a/Examples/Physics_applications/plasma_mirror/inputs_2d b/Examples/Physics_applications/plasma_mirror/inputs_2d
index 1cc422c89..14eec0537 100644
--- a/Examples/Physics_applications/plasma_mirror/inputs_2d
+++ b/Examples/Physics_applications/plasma_mirror/inputs_2d
@@ -7,13 +7,18 @@ amr.max_grid_size = 128
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
geometry.prob_lo = -100.e-6 0. # physical domain
geometry.prob_hi = 100.e-6 100.e-6
warpx.verbose = 1
warpx.serialize_ics = 1
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
+
+#################################
############ NUMERICS ###########
#################################
my_constants.zc = 20.e-6
diff --git a/Examples/Physics_applications/uniform_plasma/inputs_2d b/Examples/Physics_applications/uniform_plasma/inputs_2d
index a3bd0d3a8..05db6a840 100644
--- a/Examples/Physics_applications/uniform_plasma/inputs_2d
+++ b/Examples/Physics_applications/uniform_plasma/inputs_2d
@@ -7,11 +7,16 @@ amr.max_grid_size = 64
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 # Is periodic?
geometry.prob_lo = -20.e-6 -20.e-6 # physical domain
geometry.prob_hi = 20.e-6 20.e-6
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
warpx.serialize_ics = 1
diff --git a/Examples/Physics_applications/uniform_plasma/inputs_3d b/Examples/Physics_applications/uniform_plasma/inputs_3d
index 3dd47c255..f342ceb28 100644
--- a/Examples/Physics_applications/uniform_plasma/inputs_3d
+++ b/Examples/Physics_applications/uniform_plasma/inputs_3d
@@ -7,11 +7,16 @@ amr.max_grid_size = 32
amr.blocking_factor = 16
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -20.e-6 -20.e-6 -20.e-6 # physical domain
geometry.prob_hi = 20.e-6 20.e-6 20.e-6
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
warpx.serialize_ics = 1
diff --git a/Examples/Tests/ElectrostaticSphere/inputs_3d b/Examples/Tests/ElectrostaticSphere/inputs_3d
index 89903ab37..a0035ee3a 100644
--- a/Examples/Tests/ElectrostaticSphere/inputs_3d
+++ b/Examples/Tests/ElectrostaticSphere/inputs_3d
@@ -4,10 +4,10 @@ amr.max_level = 0
amr.blocking_factor = 8
amr.max_grid_size = 128
geometry.coord_sys = 0
-geometry.is_periodic = 0 0 0
geometry.prob_lo = -0.5 -0.5 -0.5
geometry.prob_hi = 0.5 0.5 0.5
-warpx.do_pml = 0
+boundary.field_lo = pec pec pec
+boundary.field_hi = pec pec pec
warpx.const_dt = 1e-6
warpx.do_electrostatic = relativistic
diff --git a/Examples/Tests/ElectrostaticSphere/inputs_rz b/Examples/Tests/ElectrostaticSphere/inputs_rz
index 6634fa3f5..23f64cd7f 100644
--- a/Examples/Tests/ElectrostaticSphere/inputs_rz
+++ b/Examples/Tests/ElectrostaticSphere/inputs_rz
@@ -4,10 +4,10 @@ amr.max_level = 0
amr.blocking_factor = 8
amr.max_grid_size = 128
geometry.coord_sys = 1
-geometry.is_periodic = 0 0 0
geometry.prob_lo = 0. -0.5
geometry.prob_hi = 0.5 0.5
-warpx.do_pml = 0
+boundary.field_lo = none pec
+boundary.field_hi = pec pec
warpx.const_dt = 1e-6
warpx.do_electrostatic = labframe
warpx.use_filter = 0
diff --git a/Examples/Tests/ElectrostaticSphereEB/inputs_3d b/Examples/Tests/ElectrostaticSphereEB/inputs_3d
index fa1c558a2..aa30f1ccd 100644
--- a/Examples/Tests/ElectrostaticSphereEB/inputs_3d
+++ b/Examples/Tests/ElectrostaticSphereEB/inputs_3d
@@ -14,7 +14,6 @@ boundary.potential_lo_z = 0
boundary.potential_hi_z = 0
geometry.prob_lo = -0.5 -0.5 -0.5
geometry.prob_hi = 0.5 0.5 0.5
-warpx.do_pml = 0
warpx.const_dt = 1e-6
warpx.do_electrostatic = labframe
diff --git a/Examples/Tests/Langmuir/inputs_2d_multi_rt b/Examples/Tests/Langmuir/inputs_2d_multi_rt
index 35b8c9fac..7831bbb49 100644
--- a/Examples/Tests/Langmuir/inputs_2d_multi_rt
+++ b/Examples/Tests/Langmuir/inputs_2d_multi_rt
@@ -13,10 +13,13 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 # Is periodic?
geometry.prob_lo = -20.e-6 -20.e-6 # physical domain
geometry.prob_hi = 20.e-6 20.e-6
+# Boundary condition
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
warpx.serialize_ics = 1
# Verbosity
@@ -24,7 +27,6 @@ warpx.verbose = 1
# Algorithms
algo.field_gathering = energy-conserving
-warpx.do_pml = 0
warpx.use_filter = 0
# Order of particle shape factors
diff --git a/Examples/Tests/Langmuir/inputs_2d_multi_rz_rt b/Examples/Tests/Langmuir/inputs_2d_multi_rz_rt
index f133cdcb7..06ed884dc 100644
--- a/Examples/Tests/Langmuir/inputs_2d_multi_rz_rt
+++ b/Examples/Tests/Langmuir/inputs_2d_multi_rz_rt
@@ -24,7 +24,6 @@ warpx.serialize_ics = 1
warpx.verbose = 1
# Algorithms
-warpx.do_pml = 0
algo.field_gathering = energy-conserving
algo.current_deposition = esirkepov
warpx.use_filter = 0
diff --git a/Examples/Tests/Langmuir/inputs_3d_multi_rt b/Examples/Tests/Langmuir/inputs_3d_multi_rt
index 4d08a2a43..232bf3d29 100644
--- a/Examples/Tests/Langmuir/inputs_3d_multi_rt
+++ b/Examples/Tests/Langmuir/inputs_3d_multi_rt
@@ -13,10 +13,13 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -20.e-6 -20.e-6 -20.e-6 # physical domain
geometry.prob_hi = 20.e-6 20.e-6 20.e-6
+# Boundary condition
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
warpx.serialize_ics = 1
# Verbosity
@@ -25,7 +28,6 @@ warpx.verbose = 1
# Algorithms
algo.current_deposition = esirkepov
algo.field_gathering = energy-conserving
-warpx.do_pml = 0
warpx.use_filter = 0
# Order of particle shape factors
diff --git a/Examples/Tests/Larmor/inputs_2d_mr b/Examples/Tests/Larmor/inputs_2d_mr
index 7431180d6..ff2598f01 100644
--- a/Examples/Tests/Larmor/inputs_2d_mr
+++ b/Examples/Tests/Larmor/inputs_2d_mr
@@ -19,12 +19,14 @@ warpx.fine_tag_hi = 0.8 0.8
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 0 # Is periodic?
geometry.prob_lo = -2.0 -2.0 # physical domain
geometry.prob_hi = 2.0 2.0
+# Boundary condition
+boundary.field_lo = pml pml pml
+boundary.field_hi = pml pml pml
+
# PML
-warpx.do_pml = 1
warpx.pml_ncell = 10
particles.B_ext_particle_init_style = "constant"
diff --git a/Examples/Tests/Maxwell_Hybrid_QED/inputs_2d b/Examples/Tests/Maxwell_Hybrid_QED/inputs_2d
index 693c391f8..390ec0f41 100644
--- a/Examples/Tests/Maxwell_Hybrid_QED/inputs_2d
+++ b/Examples/Tests/Maxwell_Hybrid_QED/inputs_2d
@@ -6,7 +6,6 @@ amr.n_cell = 64 1024
amr.max_grid_size = 4096
amr.blocking_factor = 8
geometry.coord_sys = 0
-geometry.is_periodic = 1 1 1
geometry.prob_lo = -32.e-6 -512.e-6
geometry.prob_hi = 32.e-6 512.e-6
amr.max_level = 0
@@ -14,13 +13,18 @@ warpx.do_nodal = 1
warpx.quantum_xi = 1.e-23
#################################
+####### Boundary Condition ######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
algo.maxwell_solver = psatd
warpx.verbose = 0
warpx.use_filter = 1
warpx.cfl = 1.
-warpx.do_pml = 0
warpx.use_hybrid_QED = 1
#################################
diff --git a/Examples/Tests/PML/inputs_2d b/Examples/Tests/PML/inputs_2d
index 3284e98fd..f7a71bc59 100644
--- a/Examples/Tests/PML/inputs_2d
+++ b/Examples/Tests/PML/inputs_2d
@@ -13,16 +13,18 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0
-geometry.is_periodic = 0 0 0
geometry.prob_lo = -30.e-6 -120.e-6
geometry.prob_hi = 30.e-6 120.e-6
+# Boundary condition
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
+
# Verbosity
warpx.verbose = 1
# Algorithms
warpx.cfl = 1.0
-warpx.do_pml = 1
warpx.use_filter = 0
warpx.do_moving_window = 0
diff --git a/Examples/Tests/PML/inputs_3d b/Examples/Tests/PML/inputs_3d
index c3e33977c..be66df340 100644
--- a/Examples/Tests/PML/inputs_3d
+++ b/Examples/Tests/PML/inputs_3d
@@ -6,13 +6,15 @@ amr.max_level = 0
# Domain and boundary conditions
geometry.coord_sys = 0
-geometry.is_periodic = 0 0 0
geometry.prob_lo = -1.5e-05 -1.5e-05 -1.5e-05
geometry.prob_hi = 1.5e-05 1.5e-05 1.5e-05
+# Boundary condition
+boundary.field_lo = pml pml pml
+boundary.field_hi = pml pml pml
+
# Numerical parameters
warpx.cfl = 1.0
-warpx.do_pml = 1
warpx.do_nodal = 0
warpx.do_dive_cleaning = 0
warpx.do_pml_dive_cleaning = 1
diff --git a/Examples/Tests/SingleParticle/inputs_2d b/Examples/Tests/SingleParticle/inputs_2d
index 152cac0a2..fef6e896d 100644
--- a/Examples/Tests/SingleParticle/inputs_2d
+++ b/Examples/Tests/SingleParticle/inputs_2d
@@ -4,10 +4,13 @@ amr.max_level = 0
amr.blocking_factor = 8
amr.max_grid_size = 8
geometry.coord_sys = 0
-geometry.is_periodic = 0 0
geometry.prob_lo = -8 -12
geometry.prob_hi = 8 12
-warpx.do_pml = 0
+
+# Boundary condition
+boundary.field_lo = pec pec
+boundary.field_hi = pec pec
+
algo.charge_deposition = standard
algo.field_gathering = energy-conserving
warpx.cfl = 1.0
diff --git a/Examples/Tests/averaged_galilean/inputs_avg_2d b/Examples/Tests/averaged_galilean/inputs_avg_2d
index bfb0e3452..441266946 100644
--- a/Examples/Tests/averaged_galilean/inputs_avg_2d
+++ b/Examples/Tests/averaged_galilean/inputs_avg_2d
@@ -12,12 +12,16 @@ psatd.v_galilean = 0 0 -0.99498743710662
psatd.do_time_averaging = 1
geometry.coord_sys = 0
-geometry.is_periodic = 1 1
-
geometry.prob_lo = -12.3776 -49.5104
geometry.prob_hi = 12.3776 49.5104
#################################
+###### Boundary Condition #######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
diff --git a/Examples/Tests/averaged_galilean/inputs_avg_3d b/Examples/Tests/averaged_galilean/inputs_avg_3d
index 59e28b8de..1fef0ea0a 100644
--- a/Examples/Tests/averaged_galilean/inputs_avg_3d
+++ b/Examples/Tests/averaged_galilean/inputs_avg_3d
@@ -11,11 +11,16 @@ psatd.v_galilean = 0. 0. 0.99498743710662
psatd.do_time_averaging = 1
geometry.coord_sys = 0
-geometry.is_periodic = 1 1 1
geometry.prob_lo = -9.67 -9.67 -19.34
geometry.prob_hi = 9.67 9.67 19.34
#################################
+###### Boundary Condition #######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
diff --git a/Examples/Tests/collision/inputs_2d b/Examples/Tests/collision/inputs_2d
index 2e720ba7e..70720c5d0 100644
--- a/Examples/Tests/collision/inputs_2d
+++ b/Examples/Tests/collision/inputs_2d
@@ -7,10 +7,14 @@ amr.max_grid_size = 8
amr.blocking_factor = 8
amr.max_level = 0
geometry.coord_sys = 0
-geometry.is_periodic = 1 1
geometry.prob_lo = 0. 0.
geometry.prob_hi = 4.154046151855669e2 4.154046151855669e2
-warpx.do_pml = 0
+
+#################################
+###### Boundary Condition #######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
#################################
############ NUMERICS ###########
diff --git a/Examples/Tests/collision/inputs_3d b/Examples/Tests/collision/inputs_3d
index 009a495c8..955e8ceed 100644
--- a/Examples/Tests/collision/inputs_3d
+++ b/Examples/Tests/collision/inputs_3d
@@ -7,10 +7,14 @@ amr.max_grid_size = 8
amr.blocking_factor = 8
amr.max_level = 0
geometry.coord_sys = 0
-geometry.is_periodic = 1 1 1
geometry.prob_lo = 0. 0. 0.
geometry.prob_hi = 4.154046151855669e2 4.154046151855669e2 4.154046151855669e2
-warpx.do_pml = 0
+
+#################################
+###### Boundary Condition #######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
#################################
############ NUMERICS ###########
diff --git a/Examples/Tests/comoving/inputs_2d_hybrid b/Examples/Tests/comoving/inputs_2d_hybrid
index 055224892..2c21788f8 100644
--- a/Examples/Tests/comoving/inputs_2d_hybrid
+++ b/Examples/Tests/comoving/inputs_2d_hybrid
@@ -5,10 +5,15 @@ amr.n_cell = 96 704
warpx.numprocs = 1 2
geometry.coord_sys = 0
-geometry.is_periodic = 1 0
geometry.prob_lo = -90.e-6 -70.e-6
geometry.prob_hi = 90.e-6 0.e-6
+#################################
+###### Boundary Condition #######
+#################################
+boundary.field_lo = periodic damped
+boundary.field_hi = periodic damped
+
algo.maxwell_solver = psatd
algo.current_deposition = direct
algo.charge_deposition = standard
@@ -23,7 +28,6 @@ psatd.v_comoving = 0. 0. -0.9970370305242862
warpx.cfl = 1.
warpx.do_nodal = 0
-warpx.do_pml = 0
warpx.gamma_boost = 13.
warpx.boost_direction = z
diff --git a/Examples/Tests/divb_cleaning/inputs_3d b/Examples/Tests/divb_cleaning/inputs_3d
index 8e5a17e4a..79fec53e7 100644
--- a/Examples/Tests/divb_cleaning/inputs_3d
+++ b/Examples/Tests/divb_cleaning/inputs_3d
@@ -8,10 +8,13 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0
-geometry.is_periodic = 0 0 0
geometry.prob_lo = -50.e-6 -50.e-6 -50.e-6
geometry.prob_hi = 50.e-6 50.e-6 50.e-6
+# Boundary condition
+boundary.field_lo = pml pml pml
+boundary.field_hi = pml pml pml
+
# Order of particle shape factors
algo.particle_shape = 3
diff --git a/Examples/Tests/galilean/inputs_2d b/Examples/Tests/galilean/inputs_2d
index 3d67f201b..c392db77d 100644
--- a/Examples/Tests/galilean/inputs_2d
+++ b/Examples/Tests/galilean/inputs_2d
@@ -10,11 +10,16 @@ amr.max_level = 0
psatd.v_galilean = 0. 0. -0.99498743710662
geometry.coord_sys = 0
-geometry.is_periodic = 1 1
geometry.prob_lo = -38.68 -38.68
geometry.prob_hi = 38.68 38.68
#################################
+####### Boundary Condition ######
+#################################
+boundary.field_lo = periodic periodic
+boundary.field_hi = periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
diff --git a/Examples/Tests/galilean/inputs_2d_hybrid b/Examples/Tests/galilean/inputs_2d_hybrid
index 892dfe530..0cab68eab 100644
--- a/Examples/Tests/galilean/inputs_2d_hybrid
+++ b/Examples/Tests/galilean/inputs_2d_hybrid
@@ -5,10 +5,13 @@ amr.n_cell = 96 704
warpx.numprocs = 1 2
geometry.coord_sys = 0
-geometry.is_periodic = 1 0
geometry.prob_lo = -90.e-6 -70.e-6
geometry.prob_hi = 90.e-6 0.e-6
+# Boundary condition
+boundary.field_lo = periodic damped
+boundary.field_hi = periodic damped
+
algo.maxwell_solver = psatd
algo.current_deposition = direct
algo.charge_deposition = standard
@@ -23,7 +26,6 @@ psatd.use_default_v_galilean = 1
warpx.cfl = 1.
warpx.do_nodal = 0
-warpx.do_pml = 0
warpx.gamma_boost = 13.
warpx.boost_direction = z
diff --git a/Examples/Tests/galilean/inputs_3d b/Examples/Tests/galilean/inputs_3d
index 671146762..f8042a918 100644
--- a/Examples/Tests/galilean/inputs_3d
+++ b/Examples/Tests/galilean/inputs_3d
@@ -10,11 +10,16 @@ amr.max_level = 0
psatd.v_galilean = 0. 0. 0.99498743710662
geometry.coord_sys = 0
-geometry.is_periodic = 1 1 1
geometry.prob_lo = -9.67 -9.67 -9.67
geometry.prob_hi = 9.67 9.67 9.67
#################################
+###### Boundary condition #######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
+#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
diff --git a/Examples/Tests/initial_distribution/inputs b/Examples/Tests/initial_distribution/inputs
index cb12f251f..b307db142 100644
--- a/Examples/Tests/initial_distribution/inputs
+++ b/Examples/Tests/initial_distribution/inputs
@@ -7,10 +7,14 @@ amr.max_grid_size = 8
amr.blocking_factor = 8
amr.max_level = 0
geometry.coord_sys = 0
-geometry.is_periodic = 1 1 1
geometry.prob_lo = -1.0 -1.0 -1.0
geometry.prob_hi = 1.0 1.0 1.0
-warpx.do_pml = 0
+
+#################################
+####### Boundary Condition ######
+#################################
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
#################################
############ NUMERICS ###########
diff --git a/Examples/Tests/initial_plasma_profile/inputs b/Examples/Tests/initial_plasma_profile/inputs
index 28de9e67f..e62d47aaa 100644
--- a/Examples/Tests/initial_plasma_profile/inputs
+++ b/Examples/Tests/initial_plasma_profile/inputs
@@ -7,10 +7,14 @@ amr.max_grid_size = 64
amr.blocking_factor = 64
amr.max_level = 0
geometry.coord_sys = 0
-geometry.is_periodic = 0 0
geometry.prob_lo = -0.00024190484157981564 -0.00016126989438654374
geometry.prob_hi = 0.00024190484157981564 1.e-6
-warpx.do_pml = 0
+
+#################################
+###### Boundary condition #######
+#################################
+boundary.field_lo = pec pec
+boundary.field_hi = pec pec
#################################
############ NUMERICS ###########
diff --git a/Examples/Tests/laser_on_fine/inputs_2d b/Examples/Tests/laser_on_fine/inputs_2d
index e973c126e..b256aa6a3 100644
--- a/Examples/Tests/laser_on_fine/inputs_2d
+++ b/Examples/Tests/laser_on_fine/inputs_2d
@@ -19,12 +19,14 @@ warpx.fine_tag_hi = 10.e-6 0.4e-6
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 0 # Is periodic?
geometry.prob_lo = -30.e-6 -1.25e-6 # physical domain
geometry.prob_hi = 30.e-6 1.25e-6
+# Boundary condition
+boundary.field_lo = periodic pml
+boundary.field_hi = periodic pml
+
# PML
-warpx.do_pml = 1
warpx.pml_ncell = 10
# Verbosity
diff --git a/Examples/Tests/multi_J/inputs_2d b/Examples/Tests/multi_J/inputs_2d
index 2bf505f97..a0b46ada1 100644
--- a/Examples/Tests/multi_J/inputs_2d
+++ b/Examples/Tests/multi_J/inputs_2d
@@ -8,10 +8,13 @@ warpx.numprocs = 1 2
# Mesh refinement and geometry
amr.max_level = 0
geometry.coord_sys = 0
-geometry.is_periodic = 1 0
geometry.prob_lo = -200e-6 -220e-6
geometry.prob_hi = 200e-6 10e-6
+# Boundary condition
+boundary.field_lo = periodic damped
+boundary.field_hi = periodic damped
+
# Algorithms
algo.current_deposition = direct
algo.field_gathering = energy-conserving
@@ -22,7 +25,6 @@ algo.particle_shape = 3
# Numerics
warpx.cfl = 3.19
warpx.do_nodal = 1
-warpx.do_pml = 0
warpx.use_filter = 1
warpx.verbose = 1
diff --git a/Examples/Tests/particle_pusher/inputs_3d b/Examples/Tests/particle_pusher/inputs_3d
index 8862906f5..f4382a246 100644
--- a/Examples/Tests/particle_pusher/inputs_3d
+++ b/Examples/Tests/particle_pusher/inputs_3d
@@ -9,12 +9,12 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # Cartesian
-geometry.is_periodic = 1 1 1 # yes
geometry.prob_lo = -2.077023075927835e+07 -2.077023075927835e+07 -2.077023075927835e+07
geometry.prob_hi = 2.077023075927835e+07 2.077023075927835e+07 2.077023075927835e+07
-# PML
-warpx.do_pml = 0
+# Boundary Condition
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
# Algorithms
algo.charge_deposition = standard
diff --git a/Examples/Tests/particles_in_PML/inputs_2d b/Examples/Tests/particles_in_PML/inputs_2d
index ece10f2d7..7d876947f 100644
--- a/Examples/Tests/particles_in_PML/inputs_2d
+++ b/Examples/Tests/particles_in_PML/inputs_2d
@@ -7,12 +7,14 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
geometry.prob_lo = -32.e-6 -32.e-6 # physical domain
geometry.prob_hi = 32.e-6 32.e-6
+# Boundary condition
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
+
# PML
-warpx.do_pml = 1
warpx.pml_ncell = 12
warpx.pml_delta = 6
warpx.pml_has_particles = 1
diff --git a/Examples/Tests/particles_in_PML/inputs_3d b/Examples/Tests/particles_in_PML/inputs_3d
index dfe7b673b..8f7288259 100644
--- a/Examples/Tests/particles_in_PML/inputs_3d
+++ b/Examples/Tests/particles_in_PML/inputs_3d
@@ -7,12 +7,14 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 0 # Is periodic?
geometry.prob_lo = -32.e-6 -32.e-6 -32.e-6 # physical domain
geometry.prob_hi = 32.e-6 32.e-6 32.e-6
+# Boundary condition
+boundary.field_lo = pml pml pml
+boundary.field_hi = pml pml pml
+
# PML
-warpx.do_pml = 1
warpx.pml_ncell = 12
warpx.pml_delta = 6
warpx.pml_has_particles = 1
diff --git a/Examples/Tests/particles_in_PML/inputs_mr_2d b/Examples/Tests/particles_in_PML/inputs_mr_2d
index f01206343..098e60b85 100644
--- a/Examples/Tests/particles_in_PML/inputs_mr_2d
+++ b/Examples/Tests/particles_in_PML/inputs_mr_2d
@@ -7,14 +7,16 @@ amr.max_level = 1
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 0 # Is periodic?
geometry.prob_lo = -32.e-6 -32.e-6 # physical domain
geometry.prob_hi = 32.e-6 32.e-6
warpx.fine_tag_lo = -8.e-6 -8.e-6 # physical domain
warpx.fine_tag_hi = 8.e-6 8.e-6
+# Boundary condition
+boundary.field_lo = pml pml pml
+boundary.field_hi = pml pml pml
+
# PML
-warpx.do_pml = 1
warpx.pml_ncell = 12
warpx.pml_delta = 6
warpx.pml_has_particles = 1
diff --git a/Examples/Tests/particles_in_PML/inputs_mr_3d b/Examples/Tests/particles_in_PML/inputs_mr_3d
index 194e29f7c..faf9085c6 100644
--- a/Examples/Tests/particles_in_PML/inputs_mr_3d
+++ b/Examples/Tests/particles_in_PML/inputs_mr_3d
@@ -7,14 +7,16 @@ amr.max_level = 1
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 0 # Is periodic?
geometry.prob_lo = -32.e-6 -32.e-6 -32.e-6 # physical domain
geometry.prob_hi = 32.e-6 32.e-6 32.e-6
warpx.fine_tag_lo = -8.e-6 -8.e-6 -8.e-6 # physical domain
warpx.fine_tag_hi = 8.e-6 8.e-6 8.e-6
+# Boundary condition
+boundary.field_lo = pml pml pml
+boundary.field_hi = pml pml pml
+
# PML
-warpx.do_pml = 1
warpx.pml_ncell = 12
warpx.pml_delta = 6
warpx.pml_has_particles = 1
diff --git a/Examples/Tests/photon_pusher/inputs_3d b/Examples/Tests/photon_pusher/inputs_3d
index faf74abf5..3d4386c0e 100644
--- a/Examples/Tests/photon_pusher/inputs_3d
+++ b/Examples/Tests/photon_pusher/inputs_3d
@@ -8,14 +8,16 @@ amr.max_level = 0
amr.blocking_factor = 8
amr.max_grid_size = 8
geometry.coord_sys = 0
-geometry.is_periodic = 1 1 1
geometry.prob_lo = -0.5e-6 -0.5e-6 -0.5e-6
geometry.prob_hi = 0.5e-6 0.5e-6 0.5e-6
-warpx.do_pml = 0
algo.charge_deposition = standard
algo.field_gathering = energy-conserving
warpx.cfl = 1.0
+# Boundary condition
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
# Order of particle shape factors
algo.particle_shape = 1
diff --git a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs_3d b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs_3d
index 40c0bd370..65a2eb4b8 100644
--- a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs_3d
+++ b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs_3d
@@ -8,7 +8,6 @@ amr.max_level = 0
amr.blocking_factor = 32
amr.max_grid_size = 64
geometry.coord_sys = 0
-geometry.is_periodic = 1 1 1
geometry.prob_lo = -8e-07 -8e-07 -8e-07
geometry.prob_hi = 8e-07 8e-07 8e-07
warpx.do_pml = 0
@@ -17,6 +16,10 @@ algo.field_gathering = energy-conserving
warpx.cfl = 1.0
warpx.serialize_ics = 1
+# Boundary condition
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
# Order of particle shape factors
algo.particle_shape = 1
diff --git a/Examples/Tests/reduced_diags/inputs b/Examples/Tests/reduced_diags/inputs
index e8941940f..3420869ed 100644
--- a/Examples/Tests/reduced_diags/inputs
+++ b/Examples/Tests/reduced_diags/inputs
@@ -13,10 +13,13 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = -1. -1. -1. # physical domain
geometry.prob_hi = 1. 1. 1.
+# Boundary condition
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
# Algorithms
algo.current_deposition = esirkepov
algo.field_gathering = energy-conserving # or momentum-conserving
diff --git a/Examples/Tests/reduced_diags/inputs_loadbalancecosts b/Examples/Tests/reduced_diags/inputs_loadbalancecosts
index c0d40a582..3d1be1764 100644
--- a/Examples/Tests/reduced_diags/inputs_loadbalancecosts
+++ b/Examples/Tests/reduced_diags/inputs_loadbalancecosts
@@ -13,10 +13,13 @@ amr.max_level = 0
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 1 # Is periodic?
geometry.prob_lo = 0. 0. 0. # physical domain
geometry.prob_hi = 4. 4. 4.
+# Boundary condition
+boundary.field_lo = periodic periodic periodic
+boundary.field_hi = periodic periodic periodic
+
# Algorithms
algo.current_deposition = esirkepov
algo.field_gathering = energy-conserving # or momentum-conserving
diff --git a/Examples/Tests/restart/inputs b/Examples/Tests/restart/inputs
index 3f9e2692e..50b5cdfa9 100644
--- a/Examples/Tests/restart/inputs
+++ b/Examples/Tests/restart/inputs
@@ -8,18 +8,22 @@ amr.max_grid_size = 64
amr.blocking_factor = 32
amr.max_level = 0
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 1 1 0 # Is periodic?
geometry.prob_lo = -0.00015 -0.00015 -0.00012
geometry.prob_hi = 0.00015 0.00015 1.e-06
#################################
+####### Boundary condition ######
+#################################
+boundary.field_lo = periodic periodic pml
+boundary.field_hi = periodic periodic pml
+
+#################################
############ NUMERICS ###########
#################################
algo.maxwell_solver = ckc
warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
-warpx.do_pml = 1
warpx.cfl = .99
warpx.do_moving_window = 1
warpx.moving_window_dir = z
diff --git a/Examples/Tests/subcycling/inputs_2d b/Examples/Tests/subcycling/inputs_2d
index 4a43bf5d1..9d01163bb 100644
--- a/Examples/Tests/subcycling/inputs_2d
+++ b/Examples/Tests/subcycling/inputs_2d
@@ -14,15 +14,17 @@ warpx.fine_tag_hi = 2.e-6 -7.e-6
# Geometry
geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
geometry.prob_lo = -30.e-6 -20.e-6 # physical domain
geometry.prob_hi = 30.e-6 0.e-6
+# Boundary condition
+boundary.field_lo = pml pml
+boundary.field_hi = pml pml
+
# Verbosity
warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 1
-warpx.do_pml = 1
warpx.do_subcycling = 1
warpx.refine_plasma = 0
warpx.n_current_deposition_buffer = 0
diff --git a/Regression/Checksum/benchmarks_json/PEC_particle.json b/Regression/Checksum/benchmarks_json/PEC_particle.json
index f6c1bf3a4..f8b2ecf3a 100644
--- a/Regression/Checksum/benchmarks_json/PEC_particle.json
+++ b/Regression/Checksum/benchmarks_json/PEC_particle.json
@@ -2,34 +2,34 @@
"electron": {
"particle_cpu": 0.0,
"particle_id": 1.0,
- "particle_momentum_x": 5.957203757427428e-31,
- "particle_momentum_y": 1.9967937404466168e-32,
- "particle_momentum_z": 1.98439211397183e-47,
- "particle_position_x": 3.199800000000332e-05,
- "particle_position_y": 2.779673004428267e-19,
- "particle_position_z": 1.0949416650810793e-34,
+ "particle_momentum_x": 4.561563069992995e-31,
+ "particle_momentum_y": 4.735240262495859e-34,
+ "particle_momentum_z": 1.4878853257695474e-48,
+ "particle_position_x": 3.199800000000243e-05,
+ "particle_position_y": 6.591777047777483e-21,
+ "particle_position_z": 8.873588080118934e-36,
"particle_weight": 1.0
},
"lev=0": {
- "Bx": 5.66137047937551e-05,
- "By": 1.8816537559788902e-16,
- "Bz": 0.00011100031731970804,
- "Ex": 26731.847337613115,
- "Ey": 29057.33399043876,
- "Ez": 16060.200852115468,
- "jx": 5.7823931096313506e-05,
- "jy": 43090052.266495675,
+ "Bx": 5.6613704793749764e-05,
+ "By": 1.3668526864402908e-16,
+ "Bz": 0.00011100031731970013,
+ "Ex": 26731.847337630617,
+ "Ey": 29057.33399045148,
+ "Ez": 16060.200852127744,
+ "jx": 4.476492463177985e-05,
+ "jy": 43090052.26648685,
"jz": 0.0
},
"proton": {
"particle_cpu": 0.0,
"particle_id": 2.0,
- "particle_momentum_x": 5.652705594934373e-32,
- "particle_momentum_y": 1.0028788756153835e-18,
- "particle_momentum_z": 1.9377019463348945e-48,
- "particle_position_x": 3.199799999999942e-05,
- "particle_position_y": 6.572670690061942e-06,
- "particle_position_z": 5.250319610855047e-36,
+ "particle_momentum_x": 5.254805380844201e-32,
+ "particle_momentum_y": 1.002878875615426e-18,
+ "particle_momentum_z": 8.190436884590936e-50,
+ "particle_position_x": 3.199799999999955e-05,
+ "particle_position_y": 6.5726706900619935e-06,
+ "particle_position_z": 2.149900391709847e-36,
"particle_weight": 1.0
}
-}
+} \ No newline at end of file
diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp
index 9e5dd6465..a29696a28 100644
--- a/Source/Initialization/WarpXInitData.cpp
+++ b/Source/Initialization/WarpXInitData.cpp
@@ -224,30 +224,14 @@ void
WarpX::InitPML ()
{
- // if periodicity defined in input, use existing pml interface
- amrex::Vector<int> geom_periodicity(AMREX_SPACEDIM,0);
- ParmParse pp_geometry("geometry");
- if (pp_geometry.queryarr("is_periodic", geom_periodicity)) {
- for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
- if (geom_periodicity[idim] == 1) {
- do_pml_Lo[idim] = 0;
- do_pml_Hi[idim] = 0;
- }
+ for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
+ if (WarpX::field_boundary_lo[idim] == FieldBoundaryType::PML) {
+ do_pml = 1;
+ do_pml_Lo[idim] = 1;
}
- } else {
- // setting do_pml = 0 as default and turning it on only when user-input is set to PML.
- do_pml = 0;
- do_pml_Lo = amrex::IntVect::TheZeroVector();
- do_pml_Hi = amrex::IntVect::TheZeroVector();
- for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
- if (WarpX::field_boundary_lo[idim] == FieldBoundaryType::PML) {
- do_pml = 1;
- do_pml_Lo[idim] = 1;
- }
- if (WarpX::field_boundary_hi[idim] == FieldBoundaryType::PML) {
- do_pml = 1;
- do_pml_Hi[idim] = 1;
- }
+ if (WarpX::field_boundary_hi[idim] == FieldBoundaryType::PML) {
+ do_pml = 1;
+ do_pml_Hi[idim] = 1;
}
}
if (finest_level > 0) do_pml = 1;
diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp
index 112a66bd6..a88156f89 100644
--- a/Source/Utils/WarpXUtil.cpp
+++ b/Source/Utils/WarpXUtil.cpp
@@ -492,53 +492,7 @@ void ReadBCParams ()
ParmParse pp_algo("algo");
int maxwell_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver");
if (pp_geometry.queryarr("is_periodic", geom_periodicity)) {
- // set default field and particle boundary appropriately
- for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
- if (geom_periodicity[idim] == 1) {
- // set boundary to periodic based on user-defined periodicity
- WarpX::field_boundary_lo[idim] = FieldBoundaryType::Periodic;
- WarpX::field_boundary_hi[idim] = FieldBoundaryType::Periodic;
- WarpX::particle_boundary_lo[idim] = ParticleBoundaryType::Periodic;
- WarpX::particle_boundary_hi[idim] = ParticleBoundaryType::Periodic;
- } else {
- // if non-periodic and do_pml=0, then set default boundary to PEC
- int pml_input = 1;
- int silverMueller_input = 0;
- pp_warpx.query("do_pml", pml_input);
- pp_warpx.query("do_silver_mueller", silverMueller_input);
- if (pml_input == 0 and silverMueller_input == 0) {
- if (maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
- WarpX::field_boundary_lo[idim] = FieldBoundaryType::None;
- WarpX::field_boundary_hi[idim] = FieldBoundaryType::None;
- } else {
- WarpX::field_boundary_lo[idim] = FieldBoundaryType::PEC;
- WarpX::field_boundary_hi[idim] = FieldBoundaryType::PEC;
- }
-#ifdef WARPX_DIM_RZ
- if (idim == 0) WarpX::field_boundary_lo[idim] = FieldBoundaryType::None;
-#endif
- }
- }
- }
- // Temporarily setting default boundary to Damped until new boundary interface is introduced
- if (maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
- ParmParse pp_psatd("psatd");
- int do_moving_window = 0;
- pp_warpx.query("do_moving_window", do_moving_window);
- if (do_moving_window == 1) {
- std::string s;
- pp_warpx.get("moving_window_dir", s);
- int zdir;
- if (s == "z" || s == "Z") {
- zdir = AMREX_SPACEDIM-1;
- WarpX::field_boundary_lo[zdir] = FieldBoundaryType::Damped;
- WarpX::field_boundary_hi[zdir] = FieldBoundaryType::Damped;
- }
- }
- }
- return;
- // When all boundary conditions are supported, the abort statement below will be introduced
- //amrex::Abort("geometry.is_periodic is not supported. Please use `boundary.field_lo`, `boundary.field_hi` to specifiy field boundary conditions and 'boundary.particle_lo', 'boundary.particle_hi' to specify particle boundary conditions.");
+ amrex::Abort("geometry.is_periodic is not supported. Please use `boundary.field_lo`, `boundary.field_hi` to specifiy field boundary conditions and 'boundary.particle_lo', 'boundary.particle_hi' to specify particle boundary conditions.");
}
// particle boundary may not be explicitly specified for some applications
bool particle_boundary_specified = false;
@@ -628,6 +582,10 @@ void ReadBCParams ()
"Error : Field boundary at r=0 must be ``none``. \n");
#endif
+ // Appending periodicity information to input so that it can be used by amrex
+ // to set parameters necessary to define geometry and perform communication
+ // such as FillBoundary. The periodicity is 1 if user-define boundary condition is
+ // periodic else it is set to 0.
pp_geometry.addarr("is_periodic", geom_periodicity);
}
diff --git a/Source/WarpX.H b/Source/WarpX.H
index 371cc5663..a30262a25 100644
--- a/Source/WarpX.H
+++ b/Source/WarpX.H
@@ -1003,7 +1003,7 @@ private:
amrex::Vector<std::unique_ptr<amrex::MultiFab> > charge_buf;
// PML
- int do_pml = 1;
+ int do_pml = 0;
int do_silver_mueller = 0;
int pml_ncell = 10;
int pml_delta = 10;
@@ -1012,8 +1012,8 @@ private:
int do_pml_in_domain = 0;
bool do_pml_dive_cleaning; // default set in WarpX.cpp
bool do_pml_divb_cleaning; // default set in WarpX.cpp
- amrex::IntVect do_pml_Lo = amrex::IntVect::TheUnitVector();
- amrex::IntVect do_pml_Hi = amrex::IntVect::TheUnitVector();
+ amrex::IntVect do_pml_Lo = amrex::IntVect::TheZeroVector();
+ amrex::IntVect do_pml_Hi = amrex::IntVect::TheZeroVector();
amrex::Vector<std::unique_ptr<PML> > pml;
amrex::Real moving_window_x = std::numeric_limits<amrex::Real>::max();