From b04479ae0f32fa767ab3a25c05eeff53916c7063 Mon Sep 17 00:00:00 2001 From: AMLattanzi Date: Mon, 28 Oct 2024 14:48:22 -0700 Subject: [PATCH] Fix EOS call and make device functions not host. --- Source/SourceTerms/ERF_buoyancy_utils.H | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/SourceTerms/ERF_buoyancy_utils.H b/Source/SourceTerms/ERF_buoyancy_utils.H index d45fe4271..ea6c79cc7 100644 --- a/Source/SourceTerms/ERF_buoyancy_utils.H +++ b/Source/SourceTerms/ERF_buoyancy_utils.H @@ -4,7 +4,7 @@ #include #include -AMREX_GPU_HOST +AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real buoyancy_dry_anelastic (int& i, @@ -31,7 +31,7 @@ buoyancy_dry_anelastic (int& i, } -AMREX_GPU_HOST +AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real buoyancy_moist_anelastic (int& i, @@ -81,19 +81,19 @@ buoyancy_dry_default (int& i, { amrex::Real rt0_hi = getRhoThetagivenP(p0_arr(i,j,k)); amrex::Real t0_hi = getTgivenPandTh(p0_arr(i,j,k), rt0_hi/r0_arr(i,j,k), rd_over_cp); - amrex::Real t_hi = getTgivenPandTh(cell_data(i,j,k ,Rho_comp), cell_data(i,j,k ,RhoTheta_comp)); + amrex::Real t_hi = getTgivenRandRTh(cell_data(i,j,k ,Rho_comp), cell_data(i,j,k ,RhoTheta_comp)); amrex::Real qplus = (t_hi-t0_hi)/t0_hi; amrex::Real rt0_lo = getRhoThetagivenP(p0_arr(i,j,k-1)); amrex::Real t0_lo = getTgivenPandTh(p0_arr(i,j,k-1), rt0_lo/r0_arr(i,j,k-1), rd_over_cp); - amrex::Real t_lo = getTgivenPandTh(cell_data(i,j,k-1,Rho_comp), cell_data(i,j,k-1,RhoTheta_comp)); + amrex::Real t_lo = getTgivenRandRTh(cell_data(i,j,k-1,Rho_comp), cell_data(i,j,k-1,RhoTheta_comp)); amrex::Real qminus = (t_lo-t0_lo)/t0_lo; amrex::Real r0_q_avg = amrex::Real(0.5) * (r0_arr(i,j,k) * qplus + r0_arr(i,j,k-1) * qminus); return (-r0_q_avg * grav_gpu); } -AMREX_GPU_HOST +AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real buoyancy_type1 (int& i, @@ -114,7 +114,7 @@ buoyancy_type1 (int& i, } -AMREX_GPU_HOST +AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real buoyancy_type2 (int& i, @@ -166,7 +166,7 @@ buoyancy_type2 (int& i, } -AMREX_GPU_HOST +AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real buoyancy_type3 (int& i, @@ -210,7 +210,7 @@ buoyancy_type3 (int& i, } -AMREX_GPU_HOST +AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real buoyancy_type4 (int& i,