Skip to content

Commit

Permalink
Fix a bug in BoxArray for SyncRegister (#2458)
Browse files Browse the repository at this point in the history
A bug was introduced recently in #2452.  I forgot that code was used by
SyncRegister in IAMR.
  • Loading branch information
WeiqunZhang authored Nov 3, 2021
1 parent 8023fd1 commit b0b7900
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Src/Base/AMReX_BoxArray.H
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ struct BATbndryReg
m_loshft = IntVect(-a_extent_rad);
m_hishft = IntVect( a_extent_rad);
IntVect nodal = a_typ.ixType();
m_hishft += nodal;
const int d = a_face.coordDir();
if (nodal[d]) {
// InterpFaceRegister
// InterpFaceRegister & SyncRegister in IAMR
if (m_face.isLow()) {
m_loshft[d] = 0;
m_hishft[d] = 0;
Expand All @@ -188,10 +189,9 @@ struct BATbndryReg
m_hishft[d] = 1;
}
m_doilo = IntVect(0);
m_doihi = IntVect(1);
m_doihi = nodal;
} else {
// BndryRegister
m_hishft += nodal;
if (m_face.isLow()) {
m_loshft[d] = nodal[d] - a_out_rad;
m_hishft[d] = nodal[d] + a_in_rad - 1;
Expand Down

0 comments on commit b0b7900

Please sign in to comment.