Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chongchonghe committed Sep 5, 2024
1 parent 4ad2b0f commit ad53e13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
10 changes: 0 additions & 10 deletions src/radiation/radiation_system.cpp

This file was deleted.

14 changes: 7 additions & 7 deletions src/radiation/radiation_system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ template <typename problem_t> struct NewtonIterationResult {

// A struct to hold the results of ComputeJacobianForPureGas or ComputeJacobianForGasAndDust
template <typename problem_t> struct JacobianResult {
double J00;
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> J0g;
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> Jg0;
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> Jgg;
double F0;
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> Fg;
double Fg_abs_sum;
double J00; // (0, 0) component of the Jacobian matrix
double F0; // (0) component of the residual
double Fg_abs_sum; // sum of the absolute values of the (g) components of the residual, g = 1, 2, ..., nGroups, and tau(g) > 0
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> J0g; // (0, g) components of the Jacobian matrix, g = 1, 2, ..., nGroups
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> Jg0; // (g, 0) components of the Jacobian matrix, g = 1, 2, ..., nGroups
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> Jgg; // (g, g) components of the Jacobian matrix, g = 1, 2, ..., nGroups
quokka::valarray<double, Physics_Traits<problem_t>::nGroups> Fg; // (g) components of the residual, g = 1, 2, ..., nGroups
};

[[nodiscard]] AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE static auto minmod_func(double a, double b) -> double
Expand Down
6 changes: 2 additions & 4 deletions src/radiation/source_terms_multi_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,6 @@ void RadSystem<problem_t>::AddSourceTermsMultiGroup(array_t &consVar, arrayconst
for (; ite < max_ite; ++ite) {
quokka::valarray<double, nGroups_> Rvec{};
quokka::valarray<double, nGroups_> fourPiBoverC{};
double T_gas = NAN;
double T_d = NAN;
quokka::valarray<double, nGroups_> kappaPVec{};
quokka::valarray<double, nGroups_> kappaEVec{};
quokka::valarray<double, nGroups_> kappaFVec{};
Expand Down Expand Up @@ -591,8 +589,8 @@ void RadSystem<problem_t>::AddSourceTermsMultiGroup(array_t &consVar, arrayconst

} else { // not constexpr (gamma_ != 1.0)

T_gas = quokka::EOS<problem_t>::ComputeTgasFromEint(rho, Egas0, massScalars);
T_d = T_gas;
const double T_gas = quokka::EOS<problem_t>::ComputeTgasFromEint(rho, Egas0, massScalars);
const double T_d = T_gas;
if constexpr (opacity_model_ == OpacityModel::piecewise_constant_opacity) {
kappa_expo_and_lower_value = DefineOpacityExponentsAndLowerValues(radBoundaries_g_copy, rho, T_d);
for (int g = 0; g < nGroups_; ++g) {
Expand Down

0 comments on commit ad53e13

Please sign in to comment.