Skip to content

Commit 25e26cc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e9b1768 commit 25e26cc

3 files changed

Lines changed: 9 additions & 15 deletions

File tree

src/radiation/radiation_system.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,16 @@ template <typename problem_t> struct FluxUpdateResult {
140140
// to work around an NVCC limitation that disallows first-capturing variables in
141141
// constexpr-if contexts inside extended device lambdas.
142142
template <typename problem_t>
143-
AMREX_GPU_DEVICE auto ComputeCellCenteredB(int i, int j, int k,
144-
std::array<amrex::Array4<const amrex::Real>, AMREX_SPACEDIM> const &fc) -> std::array<amrex::Real, 3>
143+
AMREX_GPU_DEVICE auto ComputeCellCenteredB(int i, int j, int k, std::array<amrex::Array4<const amrex::Real>, AMREX_SPACEDIM> const &fc)
144+
-> std::array<amrex::Real, 3>
145145
{
146146
amrex::Real bx = 0.0;
147147
amrex::Real by = 0.0;
148148
amrex::Real bz = 0.0;
149149
if constexpr (Physics_Traits<problem_t>::is_mhd_enabled) {
150-
bx = 0.5 * (fc[0](i, j, k, Physics_Indices<problem_t>::mhdFirstIndex) +
151-
fc[0](i + 1, j, k, Physics_Indices<problem_t>::mhdFirstIndex));
152-
by = 0.5 * (fc[1](i, j, k, Physics_Indices<problem_t>::mhdFirstIndex) +
153-
fc[1](i, j + 1, k, Physics_Indices<problem_t>::mhdFirstIndex));
154-
bz = 0.5 * (fc[2](i, j, k, Physics_Indices<problem_t>::mhdFirstIndex) +
155-
fc[2](i, j, k + 1, Physics_Indices<problem_t>::mhdFirstIndex));
150+
bx = 0.5 * (fc[0](i, j, k, Physics_Indices<problem_t>::mhdFirstIndex) + fc[0](i + 1, j, k, Physics_Indices<problem_t>::mhdFirstIndex));
151+
by = 0.5 * (fc[1](i, j, k, Physics_Indices<problem_t>::mhdFirstIndex) + fc[1](i, j + 1, k, Physics_Indices<problem_t>::mhdFirstIndex));
152+
bz = 0.5 * (fc[2](i, j, k, Physics_Indices<problem_t>::mhdFirstIndex) + fc[2](i, j, k + 1, Physics_Indices<problem_t>::mhdFirstIndex));
156153
}
157154
return {bx, by, bz};
158155
}

src/radiation/source_terms_multi_group.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include "radiation/radiation_system.hpp" // IWYU pragma: keep
66

7-
87
// Compute kappaE and kappaP based on the opacity model. The result is stored in the last five arguments: alpha_P, alpha_E, kappaP, kappaE, and kappaPoverE.
98
template <typename problem_t>
109
AMREX_GPU_DEVICE auto RadSystem<problem_t>::ComputeModelDependentKappaEAndKappaP(
@@ -786,8 +785,8 @@ void RadSystem<problem_t>::AddSourceTermsMultiGroup(array_t &consVar, arrayconst
786785
work = updated_energy.work;
787786

788787
// Check for convergence of the work term
789-
auto const Egastot1 = quokka::EOS<problem_t>::ComputeEgasFromEint(
790-
rho, updated_flux.gasMomentum[0], updated_flux.gasMomentum[1], updated_flux.gasMomentum[2], Egas_guess, B_cc);
788+
auto const Egastot1 = quokka::EOS<problem_t>::ComputeEgasFromEint(rho, updated_flux.gasMomentum[0], updated_flux.gasMomentum[1],
789+
updated_flux.gasMomentum[2], Egas_guess, B_cc);
791790
const double rel_lag_tol = 1.0e-8;
792791
const double lag_tol = 1.0e-13;
793792
double ref_work = rel_lag_tol * sum(abs(work));
@@ -831,8 +830,7 @@ void RadSystem<problem_t>::AddSourceTermsMultiGroup(array_t &consVar, arrayconst
831830
if constexpr (gamma_ != 1.0) {
832831
Egas_guess = Egas0 + (Egas_guess - Egas0) * gas_update_factor;
833832
consNew(i, j, k, gasInternalEnergy_index) = Egas_guess;
834-
consNew(i, j, k, gasEnergy_index) =
835-
quokka::EOS<problem_t>::ComputeEgasFromEint(rho, x1GasMom1, x2GasMom1, x3GasMom1, Egas_guess, B_cc);
833+
consNew(i, j, k, gasEnergy_index) = quokka::EOS<problem_t>::ComputeEgasFromEint(rho, x1GasMom1, x2GasMom1, x3GasMom1, Egas_guess, B_cc);
836834
} else {
837835
amrex::ignore_unused(Egas_guess);
838836
amrex::ignore_unused(Egas0);

src/radiation/source_terms_single_group.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,7 @@ void RadSystem<problem_t>::AddSourceTermsSingleGroup(array_t &consVar, arraycons
553553
if constexpr (gamma_ != 1.0) {
554554
Egas_guess = Egas0 + (Egas_guess - Egas0) * gas_update_factor;
555555
consNew(i, j, k, gasInternalEnergy_index) = Egas_guess;
556-
consNew(i, j, k, gasEnergy_index) =
557-
quokka::EOS<problem_t>::ComputeEgasFromEint(rho, x1GasMom1, x2GasMom1, x3GasMom1, Egas_guess, B_cc);
556+
consNew(i, j, k, gasEnergy_index) = quokka::EOS<problem_t>::ComputeEgasFromEint(rho, x1GasMom1, x2GasMom1, x3GasMom1, Egas_guess, B_cc);
558557
consNew(i, j, k, radEnergy_index) = Erad_guess;
559558
} else {
560559
amrex::ignore_unused(Erad_guess);

0 commit comments

Comments
 (0)