From 176deb4dfcb4d0ba306f0206f32fdd9436d2cad1 Mon Sep 17 00:00:00 2001 From: Bruce Perry Date: Tue, 31 Dec 2024 05:17:52 -0700 Subject: [PATCH] fix RY2R calc in regrid for manifold (#454) --- Source/PeleLMeX_Eos.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/PeleLMeX_Eos.cpp b/Source/PeleLMeX_Eos.cpp index 83c34e7a9..c9858a189 100644 --- a/Source/PeleLMeX_Eos.cpp +++ b/Source/PeleLMeX_Eos.cpp @@ -194,10 +194,9 @@ PeleLM::setRhoToSumRhoY(int lev, const TimeStamp& a_time) amrex::ParallelFor( ldata_p->state, [=] AMREX_GPU_DEVICE(int box_no, int i, int j, int k) noexcept { - sma[box_no](i, j, k, DENSITY) = 0.0; - for (int n = 0; n < NUM_SPECIES; n++) { - sma[box_no](i, j, k, DENSITY) += sma[box_no](i, j, k, FIRSTSPEC + n); - } + pele::physics::PhysicsType::eos_type::RY2R( + sma[box_no].cellData(i, j, k), sma[box_no](i, j, k, DENSITY), + FIRSTSPEC); }); Gpu::streamSynchronize(); }