Skip to content

Commit

Permalink
Merge branch 'chongchong/kappa-int-v8.2' of https://github.com/quokka…
Browse files Browse the repository at this point in the history
…-astro/quokka into chongchong/kappa-int-v8.2
  • Loading branch information
chongchonghe committed May 6, 2024
2 parents 2dc7431 + 7fd5d63 commit 1aa1d6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/RadhydroPulseMGint/test_radhydro_pulse_MG_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "radiation_system.hpp"

struct MGProblem {
}; // dummy type to allow compile-type polymorphism via template specialization
}; // dummy type to allow compile-type polymorphism via template specialization
struct ExactProblem {
};

Expand Down Expand Up @@ -125,7 +125,7 @@ template <> struct RadSystem_Traits<ExactProblem> {
template <>
template <typename ArrayType>
AMREX_GPU_HOST_DEVICE auto RadSystem<MGProblem>::ComputeRadQuantityExponents(ArrayType const & /*quant*/,
amrex::GpuArray<double, nGroups_ + 1> const & /*boundaries*/)
amrex::GpuArray<double, nGroups_ + 1> const & /*boundaries*/)
-> amrex::GpuArray<double, nGroups_>
{
amrex::GpuArray<double, nGroups_> exponents{};
Expand Down Expand Up @@ -186,7 +186,8 @@ template <> AMREX_GPU_HOST_DEVICE auto RadSystem<ExactProblem>::ComputePlanckOpa
return kappaPVec;
}

template <> AMREX_GPU_HOST_DEVICE auto RadSystem<ExactProblem>::ComputeFluxMeanOpacity(const double rho, const double Tgas) -> quokka::valarray<double, nGroups_>
template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<ExactProblem>::ComputeFluxMeanOpacity(const double rho, const double Tgas) -> quokka::valarray<double, nGroups_>
{
const double sigma = 101.248 * std::pow(Tgas / T0, -3.5);
quokka::valarray<double, nGroups_> kappaPVec{};
Expand Down
5 changes: 3 additions & 2 deletions src/radiation_system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ static const bool use_wavespeed_correction = false;

// enum for opacity_model
enum OpacityModel {
user = 0, // user-defined opacity for each group, given as a function of density and temperature.
piecewisePowerLaw // piecewise power-law opacity model with piecewise power-law fitting to a user-defined opacity function and on-the-fly piecewise power-law fitting to radiation energy density and flux.
user = 0, // user-defined opacity for each group, given as a function of density and temperature.
piecewisePowerLaw // piecewise power-law opacity model with piecewise power-law fitting to a user-defined opacity function and on-the-fly piecewise
// power-law fitting to radiation energy density and flux.
};

// this struct is specialized by the user application code
Expand Down

0 comments on commit 1aa1d6a

Please sign in to comment.