Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #561

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-added-large-files
Expand All @@ -11,7 +11,7 @@ repos:
- id: check-symlinks
- id: mixed-line-ending
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
rev: v18.1.5
hooks:
- id: clang-format
ci:
Expand Down
4 changes: 2 additions & 2 deletions src/AdvectionSimulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ template <typename problem_t> void AdvectionSimulation<problem_t>::advanceSingle
}

template <typename problem_t>
auto AdvectionSimulation<problem_t>::computeFluxes(amrex::MultiFab const &consVar, const int nvars, const int lev)
-> std::array<amrex::MultiFab, AMREX_SPACEDIM>
auto AdvectionSimulation<problem_t>::computeFluxes(amrex::MultiFab const &consVar, const int nvars,
const int lev) -> std::array<amrex::MultiFab, AMREX_SPACEDIM>
{
auto ba = grids[lev];
auto dm = dmap[lev];
Expand Down
4 changes: 2 additions & 2 deletions src/CheckNaN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ AMREX_GPU_HOST_DEVICE auto CheckSymmetryArray(amrex::Array4<const amrex::Real> c

template <typename T>
AMREX_GPU_HOST_DEVICE auto CheckSymmetryFluxes(amrex::Array4<const amrex::Real> const & /*arr1*/, amrex::Array4<const amrex::Real> const & /*arr2*/,
amrex::Box const & /*indexRange*/, const int /*ncomp*/, amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> /*dx*/)
-> bool
amrex::Box const & /*indexRange*/, const int /*ncomp*/,
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> /*dx*/) -> bool
{
return true; // problem-specific implementation for test problems
}
Expand Down
27 changes: 12 additions & 15 deletions src/EOS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@
};

template <typename problem_t>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputeTgasFromEint(amrex::Real rho, amrex::Real Eint,
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars)
-> amrex::Real
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto
EOS<problem_t>::ComputeTgasFromEint(amrex::Real rho, amrex::Real Eint, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real

Check notice

Code scanning / CodeQL

Large object passed by value Note

This parameter of type
optional<GpuArray<double, 14U>>
is 120 bytes - consider passing a const pointer/reference instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
EOS<problem_t>::ComputeTgasFromEint(amrex::Real rho, amrex::Real Eint, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real
EOS<problem_t>::ComputeTgasFromEint(amrex::Real rho, amrex::Real Eint, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> amrex::Real

{
// return temperature for an ideal gas given density and internal energy
amrex::Real Tgas = NAN;
Expand Down Expand Up @@ -108,9 +107,8 @@
}

template <typename problem_t>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputeEintFromTgas(amrex::Real rho, amrex::Real Tgas,
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars)
-> amrex::Real
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto
EOS<problem_t>::ComputeEintFromTgas(amrex::Real rho, amrex::Real Tgas, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real

Check notice

Code scanning / CodeQL

Large object passed by value Note

This parameter of type
optional<GpuArray<double, 14U>>
is 120 bytes - consider passing a const pointer/reference instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
EOS<problem_t>::ComputeEintFromTgas(amrex::Real rho, amrex::Real Tgas, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real
EOS<problem_t>::ComputeEintFromTgas(amrex::Real rho, amrex::Real Tgas, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> amrex::Real

{
// return internal energy density given density and temperature
amrex::Real Eint = NAN;
Expand Down Expand Up @@ -149,9 +147,9 @@
}

template <typename problem_t>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputeEintFromPres(amrex::Real rho, amrex::Real Pressure,
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars)
-> amrex::Real
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto
EOS<problem_t>::ComputeEintFromPres(amrex::Real rho, amrex::Real Pressure,
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real

Check notice

Code scanning / CodeQL

Large object passed by value Note

This parameter of type
optional<GpuArray<double, 14U>>
is 120 bytes - consider passing a const pointer/reference instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> amrex::Real

{
// return internal energy density given density and pressure
amrex::Real Eint = NAN;
Expand Down Expand Up @@ -283,9 +281,8 @@
}

template <typename problem_t>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputePressure(amrex::Real rho, amrex::Real Eint,
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars)
-> amrex::Real
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto
EOS<problem_t>::ComputePressure(amrex::Real rho, amrex::Real Eint, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real

Check notice

Code scanning / CodeQL

Large object passed by value Note

This parameter of type
optional<GpuArray<double, 14U>>
is 120 bytes - consider passing a const pointer/reference instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
EOS<problem_t>::ComputePressure(amrex::Real rho, amrex::Real Eint, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real
EOS<problem_t>::ComputePressure(amrex::Real rho, amrex::Real Eint, const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> amrex::Real

{
// return pressure for an ideal gas
amrex::Real P = NAN;
Expand Down Expand Up @@ -326,9 +323,9 @@
}

template <typename problem_t>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputeSoundSpeed(amrex::Real rho, amrex::Real Pressure,
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars)
-> amrex::Real
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto
EOS<problem_t>::ComputeSoundSpeed(amrex::Real rho, amrex::Real Pressure,
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real

Check notice

Code scanning / CodeQL

Large object passed by value Note

This parameter of type
optional<GpuArray<double, 14U>>
is 120 bytes - consider passing a const pointer/reference instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> massScalars) -> amrex::Real
const std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> amrex::Real

{
// return sound speed for an ideal gas
amrex::Real cs = NAN;
Expand Down
4 changes: 2 additions & 2 deletions src/LLF.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace quokka::Riemann
{
// Local Lax-Friedrichs (LLF) / Rusanov solver
template <typename problem_t, int N_scalars, int N_mscalars, int fluxdim>
AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto LLF(quokka::HydroState<N_scalars, N_mscalars> const &sL, quokka::HydroState<N_scalars, N_mscalars> const &sR)
-> quokka::valarray<double, fluxdim>
AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto LLF(quokka::HydroState<N_scalars, N_mscalars> const &sL,
quokka::HydroState<N_scalars, N_mscalars> const &sR) -> quokka::valarray<double, fluxdim>
{
// Toro (Eq. 10.56)
const amrex::Real Sp = std::max(std::abs(sL.u) + sL.cs, std::abs(sR.u) + sR.cs);
Expand Down
2 changes: 1 addition & 1 deletion src/NSCBC/vortex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ AMREX_GPU_MANAGED amrex::Real u0 = NAN; // NOLINT(cppcoreguidelines-av
AMREX_GPU_MANAGED amrex::Real v0 = NAN; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
AMREX_GPU_MANAGED amrex::Real w0 = NAN; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
AMREX_GPU_MANAGED amrex::GpuArray<Real, HydroSystem<Vortex>::nscalars_> s0{}; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
}; // namespace
}; // namespace

template <> void RadhydroSimulation<Vortex>::setInitialConditionsOnGrid(quokka::grid grid_elem)
{
Expand Down
9 changes: 4 additions & 5 deletions src/NSCBC_inflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ namespace NSCBC
namespace detail
{
template <typename problem_t>
AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto dQ_dx_inflow_x1_lower(quokka::valarray<Real, HydroSystem<problem_t>::nvar_> const &Q,
quokka::valarray<Real, HydroSystem<problem_t>::nvar_> const &dQ_dx_data, const Real T_t,
const Real u_t, const Real v_t, const Real w_t,
amrex::GpuArray<Real, HydroSystem<problem_t>::nscalars_> const &s_t, const Real L_x)
-> quokka::valarray<Real, HydroSystem<problem_t>::nvar_>
AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto
dQ_dx_inflow_x1_lower(quokka::valarray<Real, HydroSystem<problem_t>::nvar_> const &Q, quokka::valarray<Real, HydroSystem<problem_t>::nvar_> const &dQ_dx_data,
const Real T_t, const Real u_t, const Real v_t, const Real w_t, amrex::GpuArray<Real, HydroSystem<problem_t>::nscalars_> const &s_t,
const Real L_x) -> quokka::valarray<Real, HydroSystem<problem_t>::nvar_>
{
// return dQ/dx corresponding to subsonic inflow on the x1 lower boundary
// (This is only necessary for continuous inflows, i.e., where a shock or contact discontinuity is not desired.)
Expand Down
8 changes: 4 additions & 4 deletions src/NSCBC_outflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto transverse_zdir_dQ_data(const amrex::In
}

template <typename problem_t, FluxDir DIR>
AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto permute_vel(quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_> const &Q)
-> quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_>
AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto
permute_vel(quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_> const &Q) -> quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_>
{
// with normal direction DIR, permutes the velocity components so that
// u, v, w are the normal and transverse components, respectively.
Expand All @@ -232,8 +232,8 @@ AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto permute_vel(quokka::valarray<amrex::Rea
}

template <typename problem_t, FluxDir DIR>
AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto unpermute_vel(quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_> const &Q)
-> quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_>
AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto
unpermute_vel(quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_> const &Q) -> quokka::valarray<amrex::Real, HydroSystem<problem_t>::nvar_>
{
// with normal direction DIR, un-permutes the velocity components so that
// u, v, w are the normal and transverse components *prior to calling permute_vel*.
Expand Down
8 changes: 4 additions & 4 deletions src/RadForce/test_radiation_force.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ template <> struct RadSystem_Traits<TubeProblem> {
};

template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<TubeProblem>::ComputePlanckOpacity(const double /*rho*/, const double /*Tgas*/)
-> quokka::valarray<double, Physics_Traits<TubeProblem>::nGroups>
AMREX_GPU_HOST_DEVICE auto RadSystem<TubeProblem>::ComputePlanckOpacity(const double /*rho*/,
const double /*Tgas*/) -> quokka::valarray<double, Physics_Traits<TubeProblem>::nGroups>
{
quokka::valarray<double, Physics_Traits<TubeProblem>::nGroups> kappaPVec{};
for (int g = 0; g < nGroups_; ++g) {
Expand All @@ -84,8 +84,8 @@ AMREX_GPU_HOST_DEVICE auto RadSystem<TubeProblem>::ComputePlanckOpacity(const do
}

template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<TubeProblem>::ComputeFluxMeanOpacity(const double /*rho*/, const double /*Tgas*/)
-> quokka::valarray<double, Physics_Traits<TubeProblem>::nGroups>
AMREX_GPU_HOST_DEVICE auto
RadSystem<TubeProblem>::ComputeFluxMeanOpacity(const double /*rho*/, const double /*Tgas*/) -> quokka::valarray<double, Physics_Traits<TubeProblem>::nGroups>
{
quokka::valarray<double, Physics_Traits<TubeProblem>::nGroups> kappaFVec{};
for (int g = 0; g < nGroups_; ++g) {
Expand Down
6 changes: 3 additions & 3 deletions src/RadMarshak/test_radiation_marshak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ AMREX_GPU_HOST_DEVICE auto quokka::EOS<SuOlsonProblem>::ComputeEintFromTgas(cons
}

template <>
AMREX_GPU_HOST_DEVICE auto quokka::EOS<SuOlsonProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
AMREX_GPU_HOST_DEVICE auto
quokka::EOS<SuOlsonProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
{
// This is also known as the heat capacity, i.e.
// \del E_g / \del T = \rho c_v,
Expand Down
12 changes: 6 additions & 6 deletions src/RadMarshakAsymptotic/test_radiation_marshak_asymptotic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ template <> struct Physics_Traits<SuOlsonProblemCgs> {
};

template <>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto RadSystem<SuOlsonProblemCgs>::ComputePlanckOpacity(const double rho, const double Tgas)
-> quokka::valarray<double, nGroups_>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto RadSystem<SuOlsonProblemCgs>::ComputePlanckOpacity(const double rho,
const double Tgas) -> quokka::valarray<double, nGroups_>
{
auto sigma = kappa * std::pow(Tgas / T_hohlraum, -3); // cm^-1
quokka::valarray<double, nGroups_> kappaPVec{};
Expand All @@ -65,15 +65,15 @@ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto RadSystem<SuOlsonProblemCgs>::Comp
}

template <>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto RadSystem<SuOlsonProblemCgs>::ComputeFluxMeanOpacity(const double rho, const double Tgas)
-> quokka::valarray<double, nGroups_>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto RadSystem<SuOlsonProblemCgs>::ComputeFluxMeanOpacity(const double rho,
const double Tgas) -> quokka::valarray<double, nGroups_>
{
return ComputePlanckOpacity(rho, Tgas);
}

template <>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto RadSystem<SuOlsonProblemCgs>::ComputePlanckOpacityTempDerivative(const double rho, const double Tgas)
-> quokka::valarray<double, nGroups_>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto
RadSystem<SuOlsonProblemCgs>::ComputePlanckOpacityTempDerivative(const double rho, const double Tgas) -> quokka::valarray<double, nGroups_>
{
quokka::valarray<double, nGroups_> opacity_deriv{};
auto sigma_dT = (-3.0 * kappa / Tgas) * std::pow(Tgas / T_hohlraum, -3); // cm^-1
Expand Down
22 changes: 11 additions & 11 deletions src/RadMarshakCGS/test_radiation_marshak_cgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,33 +68,33 @@ AMREX_GPU_HOST_DEVICE auto RadSystem<SuOlsonProblemCgs>::ComputePlanckOpacity(co
}

template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<SuOlsonProblemCgs>::ComputeFluxMeanOpacity(const double /*rho*/, const double /*Tgas*/)
-> quokka::valarray<double, nGroups_>
AMREX_GPU_HOST_DEVICE auto RadSystem<SuOlsonProblemCgs>::ComputeFluxMeanOpacity(const double /*rho*/,
const double /*Tgas*/) -> quokka::valarray<double, nGroups_>
{
return ComputePlanckOpacity(0.0, 0.0);
}

static constexpr int nmscalars_ = Physics_Traits<SuOlsonProblemCgs>::numMassScalars;
template <>
AMREX_GPU_HOST_DEVICE auto quokka::EOS<SuOlsonProblemCgs>::ComputeTgasFromEint(const double /*rho*/, const double Egas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
AMREX_GPU_HOST_DEVICE auto
quokka::EOS<SuOlsonProblemCgs>::ComputeTgasFromEint(const double /*rho*/, const double Egas,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'rho' is unused [misc-unused-parameters]

Suggested change
quokka::EOS<SuOlsonProblemCgs>::ComputeTgasFromEint(const double /*rho*/, const double Egas,
quokka::EOS<SuOlsonProblemCgs>::ComputeTgasFromEint(const double /*rho*/ /*rho*/ const double Egas,

std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/ /*massScalars*/ -> double

{
return std::pow(4.0 * Egas / alpha_SuOlson, 1. / 4.);
}

template <>
AMREX_GPU_HOST_DEVICE auto quokka::EOS<SuOlsonProblemCgs>::ComputeEintFromTgas(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
AMREX_GPU_HOST_DEVICE auto
quokka::EOS<SuOlsonProblemCgs>::ComputeEintFromTgas(const double /*rho*/, const double Tgas,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'rho' is unused [misc-unused-parameters]

Suggested change
quokka::EOS<SuOlsonProblemCgs>::ComputeEintFromTgas(const double /*rho*/, const double Tgas,
quokka::EOS<SuOlsonProblemCgs>::ComputeEintFromTgas(const double /*rho*/ /*rho*/ const double Tgas,

std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/ /*massScalars*/ -> double

{
return (alpha_SuOlson / 4.0) * std::pow(Tgas, 4);
}

template <>
AMREX_GPU_HOST_DEVICE auto quokka::EOS<SuOlsonProblemCgs>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
AMREX_GPU_HOST_DEVICE auto
quokka::EOS<SuOlsonProblemCgs>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
{
// This is also known as the heat capacity, i.e.
// \del E_g / \del T = \rho c_v,
Expand Down
6 changes: 3 additions & 3 deletions src/RadMatterCoupling/test_radiation_matter_coupling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ AMREX_GPU_HOST_DEVICE auto quokka::EOS<CouplingProblem>::ComputeEintFromTgas(con
}

template <>
AMREX_GPU_HOST_DEVICE auto quokka::EOS<CouplingProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
AMREX_GPU_HOST_DEVICE auto
quokka::EOS<CouplingProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
{
// This is also known as the heat capacity, i.e.
// \del E_g / \del T = \rho c_v,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ AMREX_GPU_HOST_DEVICE auto quokka::EOS<CouplingProblem>::ComputeEintFromTgas(con
}

template <>
AMREX_GPU_HOST_DEVICE auto quokka::EOS<CouplingProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
AMREX_GPU_HOST_DEVICE auto
quokka::EOS<CouplingProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
{
// This is also known as the heat capacity, i.e.
// \del E_g / \del T = \rho c_v,
Expand Down
4 changes: 2 additions & 2 deletions src/RadPulse/test_radiation_pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ AMREX_GPU_HOST_DEVICE auto RadSystem<PulseProblem>::ComputeFluxMeanOpacity(const
}

template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<PulseProblem>::ComputePlanckOpacityTempDerivative(const double rho, const double Tgas)
-> quokka::valarray<double, nGroups_>
AMREX_GPU_HOST_DEVICE auto RadSystem<PulseProblem>::ComputePlanckOpacityTempDerivative(const double rho,
const double Tgas) -> quokka::valarray<double, nGroups_>
{
quokka::valarray<double, nGroups_> opacity_deriv{};
double opacity_deriv_scalar = 0.;
Expand Down
4 changes: 2 additions & 2 deletions src/RadStreaming/test_radiation_streaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ AMREX_GPU_HOST_DEVICE auto RadSystem<StreamingProblem>::ComputePlanckOpacity(con
}

template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<StreamingProblem>::ComputeFluxMeanOpacity(const double /*rho*/, const double /*Tgas*/)
-> quokka::valarray<double, nGroups_>
AMREX_GPU_HOST_DEVICE auto RadSystem<StreamingProblem>::ComputeFluxMeanOpacity(const double /*rho*/,
const double /*Tgas*/) -> quokka::valarray<double, nGroups_>
{
return ComputePlanckOpacity(0.0, 0.0);
}
Expand Down
6 changes: 3 additions & 3 deletions src/RadSuOlson/test_radiation_SuOlson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ AMREX_GPU_HOST_DEVICE auto quokka::EOS<MarshakProblem>::ComputeEintFromTgas(cons
}

template <>
AMREX_GPU_HOST_DEVICE auto quokka::EOS<MarshakProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
AMREX_GPU_HOST_DEVICE auto
quokka::EOS<MarshakProblem>::ComputeEintTempDerivative(const double /*rho*/, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
{
// This is also known as the heat capacity, i.e.
// \del E_g / \del T = \rho c_v,
Expand Down
16 changes: 8 additions & 8 deletions src/RadTophat/test_radiation_tophat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ template <> struct Physics_Traits<TophatProblem> {
};

template <>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto RadSystem<TophatProblem>::ComputePlanckOpacity(const double rho, const double /*Tgas*/)
-> quokka::valarray<double, nGroups_>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto RadSystem<TophatProblem>::ComputePlanckOpacity(const double rho,
const double /*Tgas*/) -> quokka::valarray<double, nGroups_>
{
quokka::valarray<double, nGroups_> kappaPVec{};
amrex::Real kappa = 0.;
Expand All @@ -77,25 +77,25 @@ AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto RadSystem<TophatProblem>::ComputeP
}

template <>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto RadSystem<TophatProblem>::ComputeFluxMeanOpacity(const double rho, const double /*Tgas*/)
-> quokka::valarray<double, nGroups_>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto RadSystem<TophatProblem>::ComputeFluxMeanOpacity(const double rho,
const double /*Tgas*/) -> quokka::valarray<double, nGroups_>
{
return ComputePlanckOpacity(rho, 0.);
}

static constexpr int nmscalars_ = Physics_Traits<TophatProblem>::numMassScalars;
template <>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto
quokka::EOS<TophatProblem>::ComputeTgasFromEint(const double rho, const double Egas, std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
quokka::EOS<TophatProblem>::ComputeTgasFromEint(const double rho, const double Egas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
{
return Egas / (rho * c_v);
}

template <>
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto
quokka::EOS<TophatProblem>::ComputeEintFromTgas(const double rho, const double Tgas, std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/)
-> double
quokka::EOS<TophatProblem>::ComputeEintFromTgas(const double rho, const double Tgas,
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'massScalars' is unused [misc-unused-parameters]

Suggested change
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/) -> double
std::optional<amrex::GpuArray<amrex::Real, nmscalars_>> /*massScalars*/ /*massScalars*/ -> double

{
return rho * c_v * Tgas;
}
Expand Down
Loading
Loading