From 0fd0e0766cf8788f8d4c2f9d55c1206bab26363b Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Thu, 12 Oct 2023 07:32:05 -0700 Subject: [PATCH] Fix typo (#1265) * update particle functionality * fix typo --- Source/IO/NCColumnFile.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Source/IO/NCColumnFile.cpp b/Source/IO/NCColumnFile.cpp index 76249da30..3d8702893 100644 --- a/Source/IO/NCColumnFile.cpp +++ b/Source/IO/NCColumnFile.cpp @@ -153,13 +153,16 @@ ERF::writeToNCColumnFile(const int lev, const int idx_vec = k - kstart; const int ialpha = i - iloc; const int jalpha = j - jloc; - auto tmp = velx(i+iloc_shift,j,k) * alpha_u(ialpha, jalpha); - Gpu::Atomic::Add(&(ucol[idx_vec]), tmp); - tmp = vely(i,j+jloc_shift,k) * alpha_v(ialpha, jalpha); - Gpu::Atomic::Add(&(vcol[idx_vec]), tmp); - tmp = state(i,j,k,Temp_comp) / state(i,j,k,Rho_comp) - * alpha_theta(ialpha, jalpha); - Gpu::Atomic::Add(&(thetacol[idx_vec]), tmp); + + auto tmpx = velx(i+iloc_shift,j,k) * alpha_u(ialpha, jalpha); + Gpu::Atomic::Add(&(ucol[idx_vec]), tmpx); + + auto tmpy = vely(i,j+jloc_shift,k) * alpha_v(ialpha, jalpha); + Gpu::Atomic::Add(&(vcol[idx_vec]), tmpy); + + auto tmpt = state(i,j,k,RhoTheta_comp) / state(i,j,k,Rho_comp) + * alpha_theta(ialpha, jalpha); + Gpu::Atomic::Add(&(thetacol[idx_vec]), tmpt); }); } }