From e18cf791d9127ab35217524cad52a62e01cf3016 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 6 May 2024 19:34:01 -0400 Subject: [PATCH] use more specialized eos types than eos_t this uses the new eos_rh_t in many places --- Source/MaestroAdvection.cpp | 2 +- Source/MaestroBaseState.cpp | 2 +- Source/MaestroDt.cpp | 2 +- Source/MaestroForce.cpp | 4 ++-- Source/MaestroGamma.cpp | 2 +- Source/MaestroInitData.cpp | 2 +- Source/MaestroPlot.cpp | 4 ++-- Source/MaestroRhoHT.cpp | 24 ++++++++++++------------ 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Source/MaestroAdvection.cpp b/Source/MaestroAdvection.cpp index 97575ad8b..7995093b8 100644 --- a/Source/MaestroAdvection.cpp +++ b/Source/MaestroAdvection.cpp @@ -136,7 +136,7 @@ void Maestro::UpdateScal( if (do_eos_h_above_cutoff && snew_arr(i, j, k, Rho) <= base_cutoff_density) { - eos_t eos_state; + eos_rh_t eos_state; eos_state.rho = snew_arr(i, j, k, Rho); eos_state.T = sold_arr(i, j, k, Temp); diff --git a/Source/MaestroBaseState.cpp b/Source/MaestroBaseState.cpp index 17a6b7402..9d861cfc9 100644 --- a/Source/MaestroBaseState.cpp +++ b/Source/MaestroBaseState.cpp @@ -178,7 +178,7 @@ void Maestro::InitBaseState(BaseState& rho0, BaseState& rhoh0, aux_ambient[iabar] = 1.0_rt / aux_ambient[iabar]; #endif - eos_t eos_state; + eos_rh_t eos_state; // use the EOS to make the state consistent eos_state.T = t_ambient; diff --git a/Source/MaestroDt.cpp b/Source/MaestroDt.cpp index e382e7a01..c7fcd8e11 100644 --- a/Source/MaestroDt.cpp +++ b/Source/MaestroDt.cpp @@ -622,7 +622,7 @@ void Maestro::FirstDt() { spd.setVal(0.0, tileBox, 0, 1); ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rep_t eos_state; // compute the sound speed from rho and temp eos_state.rho = scal_arr(i, j, k, Rho); diff --git a/Source/MaestroForce.cpp b/Source/MaestroForce.cpp index f66d190e1..0cc8c85d3 100644 --- a/Source/MaestroForce.cpp +++ b/Source/MaestroForce.cpp @@ -758,7 +758,7 @@ void Maestro::MakeTempForce( gradp0 = 0.5 * (p0_arr(i,j,k+1) - p0_arr(i,j,k-1)) / dx[2]; } #endif - eos_t eos_state; + eos_rep_t eos_state; eos_state.T = scal_arr(i, j, k, Temp); eos_state.rho = scal_arr(i, j, k, Rho); @@ -799,7 +799,7 @@ void Maestro::MakeTempForce( } else { #if AMREX_SPACEDIM == 3 ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rep_t eos_state; eos_state.T = scal_arr(i, j, k, Temp); eos_state.rho = scal_arr(i, j, k, Rho); diff --git a/Source/MaestroGamma.cpp b/Source/MaestroGamma.cpp index 0357b2772..4265fdd31 100644 --- a/Source/MaestroGamma.cpp +++ b/Source/MaestroGamma.cpp @@ -38,7 +38,7 @@ void Maestro::MakeGamma1bar(const Vector& scal, const Array4 p0_arr = p0_cart[lev].array(mfi); ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rep_t eos_state; eos_state.rho = scal_arr(i, j, k, Rho); diff --git a/Source/MaestroInitData.cpp b/Source/MaestroInitData.cpp index 43db6cfe0..623c45917 100644 --- a/Source/MaestroInitData.cpp +++ b/Source/MaestroInitData.cpp @@ -131,7 +131,7 @@ void Maestro::InitLevelDataSphr(const int lev, [[maybe_unused]] const Real time, } // initialize (rho h) and T using the EOS - eos_t eos_state; + eos_rh_t eos_state; eos_state.T = scal_arr(i, j, k, Temp); eos_state.p = p0_arr(i, j, k); eos_state.rho = scal_arr(i, j, k, Rho); diff --git a/Source/MaestroPlot.cpp b/Source/MaestroPlot.cpp index 2e6416564..68f356c26 100644 --- a/Source/MaestroPlot.cpp +++ b/Source/MaestroPlot.cpp @@ -1460,7 +1460,7 @@ void Maestro::MakeAdExcess(const Vector& state, #endif ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rep_t eos_state; eos_state.rho = state_arr(i, j, k, Rho); eos_state.T = state_arr(i, j, k, Temp); @@ -2191,7 +2191,7 @@ void Maestro::MakeDeltaGamma(const Vector& state, const Array4 deltagamma_arr = deltagamma[lev].array(mfi); ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rep_t eos_state; eos_state.rho = state_arr(i, j, k, Rho); eos_state.T = state_arr(i, j, k, Temp); diff --git a/Source/MaestroRhoHT.cpp b/Source/MaestroRhoHT.cpp index e3d5d8dc3..be0f2f3ee 100644 --- a/Source/MaestroRhoHT.cpp +++ b/Source/MaestroRhoHT.cpp @@ -32,7 +32,7 @@ void Maestro::TfromRhoH(Vector& scal, const BaseState& p0) { if (use_eos_e_instead_of_h_loc) { // (rho, (h->e)) --> T, p ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_re_t eos_state; eos_state.rho = state(i, j, k, Rho); eos_state.T = state(i, j, k, Temp); @@ -58,7 +58,7 @@ void Maestro::TfromRhoH(Vector& scal, const BaseState& p0) { } else { // (rho, h) --> T, p ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; eos_state.rho = state(i, j, k, Rho); eos_state.T = state(i, j, k, Temp); @@ -116,7 +116,7 @@ void Maestro::TfromRhoP(Vector& scal, const BaseState& p0, // (rho, p) --> T ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; eos_state.rho = state(i, j, k, Rho); eos_state.T = state(i, j, k, Temp); @@ -179,7 +179,7 @@ void Maestro::PfromRhoH(const Vector& state, // (rho, H) --> T, p ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; eos_state.rho = state_arr(i, j, k, Rho); eos_state.T = temp_old(i, j, k); @@ -255,7 +255,7 @@ void Maestro::MachfromRhoH(const Vector& scal, (u(i,j,k,2) + w0_arr(i,j,k))*(u(i,j,k,2) + w0_arr(i,j,k))); #endif - eos_t eos_state; + eos_rh_t eos_state; eos_state.rho = state(i, j, k, Rho); eos_state.T = state(i, j, k, Temp); @@ -314,7 +314,7 @@ void Maestro::CsfromRhoH(const Vector& scal, const Array4 cs_arr = cs[lev].array(mfi); ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; eos_state.rho = state(i, j, k, Rho); eos_state.T = state(i, j, k, Temp); @@ -462,7 +462,7 @@ void Maestro::HfromRhoTedge( tempbar_edge_cart[lev].array(mfi); // x-edge ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; // get edge-centered temperature if (enthalpy_pred_type_loc == predict_Tprime_then_h_loc) { @@ -532,7 +532,7 @@ void Maestro::HfromRhoTedge( // y-edge ParallelFor(ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; // get edge-centered temperature if (enthalpy_pred_type_loc == predict_Tprime_then_h_loc) { @@ -614,7 +614,7 @@ void Maestro::HfromRhoTedge( #if (AMREX_SPACEDIM == 3) // z-edge ParallelFor(zbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; // get edge-centered temperature if (enthalpy_pred_type_loc == predict_Tprime_then_h_loc) { @@ -686,7 +686,7 @@ void Maestro::HfromRhoTedge( #if (AMREX_SPACEDIM == 3) // x-edge ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; // get edge-centered temperature if (enthalpy_pred_type_loc == predict_Tprime_then_h_loc) { @@ -759,7 +759,7 @@ void Maestro::HfromRhoTedge( // y-edge ParallelFor(ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; // get edge-centered temperature if (enthalpy_pred_type_loc == predict_Tprime_then_h_loc) { @@ -832,7 +832,7 @@ void Maestro::HfromRhoTedge( // z-edge ParallelFor(zbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) { - eos_t eos_state; + eos_rh_t eos_state; // get edge-centered temperature if (enthalpy_pred_type_loc == predict_Tprime_then_h_loc) {