Skip to content

Commit

Permalink
simplified_list and no need for assert in coarse, but if fine works, …
Browse files Browse the repository at this point in the history
…coarse should
  • Loading branch information
RevathiJambunathan committed Jan 24, 2024
1 parent 528fc6f commit 82225d6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/BoundaryConditions/PML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri

BoxArray grid_ba_reduced = grid_ba;
if (do_pml_in_domain) {
BoxList bl = grid_ba.boxList();
BoxList bl = grid_ba.simplified_list();
for (auto& b : bl) {
for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
if (do_pml_Lo[idim]) {
Expand Down Expand Up @@ -770,20 +770,18 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri

BoxArray grid_cba_reduced = grid_cba;
if (do_pml_in_domain) {
BoxList bl = grid_cba.boxList();
BoxList bl = grid_cba.simplified_list();
for (auto& b : bl) {
for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
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 82225d6

Please sign in to comment.