From d65dd906bd53c83eab8c88ea0e9205aa6dc6410b Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 23 May 2023 20:24:52 -0700 Subject: [PATCH] RealBox: Accept RealVect Setters (#3328) Add overloads to RealVect. --- Src/Base/AMReX_RealBox.H | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Base/AMReX_RealBox.H b/Src/Base/AMReX_RealBox.H index 05b521a233f..7601444ee9b 100644 --- a/Src/Base/AMReX_RealBox.H +++ b/Src/Base/AMReX_RealBox.H @@ -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& 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& 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?