Skip to content

Commit

Permalink
same assertion for box length for coarse grid
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed Jan 24, 2024
1 parent 3cdacfe commit 528fc6f
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 @@ -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]);
}
}
Expand Down

0 comments on commit 528fc6f

Please sign in to comment.