Skip to content

Commit

Permalink
Add Weiqun's edits to get_line_data for clarity and efficiency.
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi committed Oct 21, 2024
1 parent 5173dc9 commit 72c2235
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Src/Base/AMReX_MultiFabUtil.H
Original file line number Diff line number Diff line change
Expand Up @@ -1024,14 +1024,9 @@ MF get_line_data (MF const& mf, int dir, IntVect const& cell, Box const& bnd_bx)
}
} else {
for (int i = 0; i < nboxes; ++i) {
Box const& b = ba[i];
IntVect lo = bnd_bx.smallEnd();
IntVect hi = bnd_bx.bigEnd();
if (!b.contains(lo)) { lo[dir] = b.smallEnd(dir); }
if (b.contains(lo)) {
if (!b.contains(hi)) { hi[dir] = b.bigEnd(dir); }
if (!bnd_bx.contains(hi)) { continue; }
Box b1d(lo,hi,b.ixType());
Box const& b = ba[i];
Box const& b1d = bnd_box & b;
if (b1d.ok()) {
bl.push_back(b1d);
procmap.push_back(dm[i]);
index_map.push_back(i);
Expand Down

0 comments on commit 72c2235

Please sign in to comment.