Skip to content

Commit

Permalink
RealBox: Accept RealVect Setters (#3328)
Browse files Browse the repository at this point in the history
Add overloads to RealVect.
  • Loading branch information
ax3l authored May 24, 2023
1 parent 4167cbe commit d65dd90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Src/Base/AMReX_RealBox.H
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,16 @@ public:
void setLo (const Real* a_lo) noexcept { AMREX_D_EXPR(xlo[0] = a_lo[0], xlo[1] = a_lo[1], xlo[2] = a_lo[2]); }
//! Sets lo side.
void setLo (const Vector<Real>& a_lo) noexcept { AMREX_D_EXPR(xlo[0] = a_lo[0], xlo[1] = a_lo[1], xlo[2] = a_lo[2]); }
//! Sets lo side.
void setLo (const RealVect& a_lo) noexcept { AMREX_D_EXPR(xlo[0] = a_lo[0], xlo[1] = a_lo[1], xlo[2] = a_lo[2]); }
//! Sets lo side in specified direction.
void setLo (int dir, Real a_lo) noexcept { BL_ASSERT(dir >= 0 && dir < AMREX_SPACEDIM); xlo[dir] = a_lo; }
//! Sets hi side.
void setHi (const Real* a_hi) noexcept { AMREX_D_EXPR(xhi[0] = a_hi[0], xhi[1] = a_hi[1], xhi[2] = a_hi[2]); }
//! Sets hi side.
void setHi (const Vector<Real>& a_hi) noexcept { AMREX_D_EXPR(xhi[0] = a_hi[0], xhi[1] = a_hi[1], xhi[2] = a_hi[2]); }
//! Sets hi side.
void setHi (const RealVect& a_hi) noexcept { AMREX_D_EXPR(xhi[0] = a_hi[0], xhi[1] = a_hi[1], xhi[2] = a_hi[2]); }
//! Sets hi side in specified direction.
void setHi (int dir, Real a_hi) noexcept { BL_ASSERT(dir >= 0 && dir < AMREX_SPACEDIM); xhi[dir] = a_hi; }
//! Is the RealBox OK; i.e. does it have non-negative volume?
Expand Down

0 comments on commit d65dd90

Please sign in to comment.