From 5598a2f430dbe0fd6c0472fa54d6534e933a0e95 Mon Sep 17 00:00:00 2001 From: psharda Date: Mon, 31 Jul 2023 16:08:41 +0200 Subject: [PATCH] add num mass scalars in template --- src/HLLC.hpp | 4 ++-- src/HydroState.hpp | 6 +++--- src/hydro_system.hpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/HLLC.hpp b/src/HLLC.hpp index bdde0d48e..42b5dfcd2 100644 --- a/src/HLLC.hpp +++ b/src/HLLC.hpp @@ -18,8 +18,8 @@ namespace quokka::Riemann // Minoshima & Miyoshi, "A low-dissipation HLLD approximate Riemann solver // for a very wide range of Mach numbers," JCP (2021).] // -template -AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto HLLC(quokka::HydroState const &sL, quokka::HydroState const &sR, const double gamma, +template +AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto HLLC(quokka::HydroState const &sL, quokka::HydroState const &sR, const double gamma, const double du, const double dw) -> quokka::valarray { // compute Roe averages diff --git a/src/HydroState.hpp b/src/HydroState.hpp index d6dd65afc..1518ac005 100644 --- a/src/HydroState.hpp +++ b/src/HydroState.hpp @@ -5,7 +5,7 @@ namespace quokka { -template struct HydroState { +template struct HydroState { double rho; // density double u; // normal velocity component double v; // transverse velocity component @@ -14,8 +14,8 @@ template struct HydroState { double cs; // adiabatic sound speed double E; // total energy density double Eint; // internal energy density - std::array scalar; // passive scalars - amrex::GpuArray massScalar; // mass scalars + std::array scalar; // passive scalars + amrex::GpuArray massScalar; // mass scalars }; } // namespace quokka diff --git a/src/hydro_system.hpp b/src/hydro_system.hpp index d797a9531..a3dba760d 100644 --- a/src/hydro_system.hpp +++ b/src/hydro_system.hpp @@ -917,7 +917,7 @@ void HydroSystem::ComputeFluxes(amrex::MultiFab &x1Flux_mf, amrex::Mu velW_index = x2Velocity_index; } - quokka::HydroState sL{}; + quokka::HydroState sL{}; sL.rho = rho_L; sL.u = x1LeftState(i, j, k, velN_index); sL.v = x1LeftState(i, j, k, velV_index); @@ -927,7 +927,7 @@ void HydroSystem::ComputeFluxes(amrex::MultiFab &x1Flux_mf, amrex::Mu sL.E = E_L; sL.Eint = Eint_L; - quokka::HydroState sR{}; + quokka::HydroState sR{}; sR.rho = rho_R; sR.u = x1RightState(i, j, k, velN_index); sR.v = x1RightState(i, j, k, velV_index); @@ -969,7 +969,7 @@ void HydroSystem::ComputeFluxes(amrex::MultiFab &x1Flux_mf, amrex::Mu #endif // solve the Riemann problem in canonical form - quokka::valarray F_canonical = quokka::Riemann::HLLC(sL, sR, gamma_, du, dw); + quokka::valarray F_canonical = quokka::Riemann::HLLC(sL, sR, gamma_, du, dw); quokka::valarray F = F_canonical; // add artificial viscosity