aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXUtil.cpp
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2023-06-08 16:45:02 -0700
committerGravatar GitHub <noreply@github.com> 2023-06-09 01:45:02 +0200
commit8ec6b19767cfaea7949fb47053c788b001994ef8 (patch)
tree1ca7c8a2f7a54fbd717f6a2d1a4d71a1f5fdaf4e /Source/Utils/WarpXUtil.cpp
parentf9c270d42573526b888036e7f92ab37bad2d1b83 (diff)
downloadWarpX-8ec6b19767cfaea7949fb47053c788b001994ef8.tar.gz
WarpX-8ec6b19767cfaea7949fb47053c788b001994ef8.tar.zst
WarpX-8ec6b19767cfaea7949fb47053c788b001994ef8.zip
`geometry.is_periodic`: Only Warn (#3974)
We want to be able to directly run a simulation from the created `warpx_used_inputs` file of a previous simulation. Since we use `geometry.is_periodic` internally to communicate boundary conditions to AMReX solvers and communication routines, we cannot fail if it is present but instead should only warn.
Diffstat (limited to 'Source/Utils/WarpXUtil.cpp')
-rw-r--r--Source/Utils/WarpXUtil.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp
index 906269cd8..debb34459 100644
--- a/Source/Utils/WarpXUtil.cpp
+++ b/Source/Utils/WarpXUtil.cpp
@@ -14,6 +14,8 @@
#include "WarpXProfilerWrapper.H"
#include "WarpXUtil.H"
+#include <ablastr/warn_manager/WarnManager.H>
+
#include <AMReX.H>
#include <AMReX_Array.H>
#include <AMReX_Array4.H>
@@ -395,13 +397,15 @@ void ReadBCParams ()
ParmParse pp_algo("algo");
int electromagnetic_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver");
- WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
- !pp_geometry.queryarr("is_periodic", geom_periodicity),
- "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."
- );
+ if (pp_geometry.queryarr("is_periodic", geom_periodicity))
+ {
+ std::string const warnMsg =
+ "geometry.is_periodic is only used internally. 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.";
+ ablastr::warn_manager::WMRecordWarning("Input", warnMsg);
+ }
// particle boundary may not be explicitly specified for some applications
bool particle_boundary_specified = false;