Skip to content

Commit

Permalink
assert that box length must be greater than size of pml when its gro…
Browse files Browse the repository at this point in the history
…wn inwards
  • Loading branch information
RevathiJambunathan committed Jan 24, 2024
1 parent 4dbfaf0 commit 3cdacfe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/BoundaryConditions/PML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,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_ba.intersects(bb) ) {
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(b.length(idim) > ncell, " box length must be greater that pml size");
b.growLo(idim, -ncell);
}
}
if (do_pml_Hi[idim]) {
Box const& bb = amrex::adjCellHi(b, idim);
if ( ! grid_ba.intersects(bb) ) {
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(b.length(idim) > ncell, " box length must be greater that pml size");
b.growHi(idim, -ncell);
}
}
Expand Down

0 comments on commit 3cdacfe

Please sign in to comment.