From ad835c3d66c439f265ec06da4df84a2cb1a04307 Mon Sep 17 00:00:00 2001 From: Bruce Perry <53018946+baperry2@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:17:05 -0600 Subject: [PATCH] fix minor MOST zref bug (#1556) --- Source/BoundaryConditions/MOSTAverage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/BoundaryConditions/MOSTAverage.cpp b/Source/BoundaryConditions/MOSTAverage.cpp index b2a5f72e8..e2dfc0d99 100644 --- a/Source/BoundaryConditions/MOSTAverage.cpp +++ b/Source/BoundaryConditions/MOSTAverage.cpp @@ -270,7 +270,7 @@ MOSTAverage::set_k_indices_N() AMREX_ASSERT_WITH_MESSAGE(m_zref <= m_zhi - 0.5 * m_dz, "Query point must be below the last z-cell!"); - int lk = static_cast(floor((m_zref - m_zlo) / m_dz - 0.5)); + int lk = static_cast(floor((m_zref - m_zlo) / m_dz)); m_zref = (lk + 0.5) * m_dz + m_zlo;