diff --git a/Source/BoundaryConditions/PML.cpp b/Source/BoundaryConditions/PML.cpp index 8cc18d93cda..449e4ba2c84 100644 --- a/Source/BoundaryConditions/PML.cpp +++ b/Source/BoundaryConditions/PML.cpp @@ -776,12 +776,14 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri if (do_pml_Lo[idim]) { Box const& bb = amrex::adjCellLo(b, idim); if ( ! grid_cba.intersects(bb) ) { + WARPX_ALWAYS_ASSERT_WITH_MESSAGE(b.length(idim) > ncell/ref_ratio[idim], " box length must be greater that pml size"); b.growLo(idim, -ncell/ref_ratio[idim]); } } if (do_pml_Hi[idim]) { Box const& bb = amrex::adjCellHi(b, idim); if ( ! grid_cba.intersects(bb) ) { + WARPX_ALWAYS_ASSERT_WITH_MESSAGE(b.length(idim) > ncell/ref_ratio[idim], " box length must be greater that pml size"); b.growHi(idim, -ncell/ref_ratio[idim]); } }