Skip to content

Commit

Permalink
fix some minor clang-tidy warnings for SDC+NSE
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Nov 10, 2023
1 parent 6ceeb5d commit 8420bc3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions integration/VODE/actual_integrator_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ void actual_integrator (BurnT& state, Real dt)
std::cout << "temp start = " << std::setprecision(16) << T_in << std::endl;
std::cout << "rhoe start = " << std::setprecision(16) << rhoe_in << std::endl;
std::cout << "xn start = ";
for (int n = 0; n < NumSpec; ++n) {
std::cout << std::setprecision(16) << xn_in[n] << " ";
for (auto X : xn_in) {
std::cout << std::setprecision(16) << X << " ";
}
std::cout << std::endl;
#ifdef AUX_THERMO
std::cout << "aux start = ";
for (int n = 0; n < NumAux; ++n) {
std::cout << std::setprecision(16) << aux_in[n] << " ";
for (auto aux : aux_in) {
std::cout << std::setprecision(16) << aux << " ";
}
std::cout << std::endl;
#endif
Expand Down
10 changes: 5 additions & 5 deletions integration/nse_update_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ void sdc_nse_burn(BurnT& state, const Real dt) {
// the new mass fractions are just those that come from the table
// make sure they are normalized
Real sum_X{0.0_rt};
for (int n = 0; n < NumSpec; ++n) {
X[n] = amrex::max(small_x, amrex::min(1.0_rt, X[n]));
sum_X += X[n];
for (auto & xn : X) {
xn = amrex::max(small_x, amrex::min(1.0_rt, xn));
sum_X += xn;
}

for (int n = 0; n < NumSpec; ++n) {
X[n] /= sum_X;
for (auto & xn : X) {
xn /= sum_X;
}

for (int n = 0; n < NumSpec; ++n) {
Expand Down
4 changes: 2 additions & 2 deletions unit_test/burn_cell_sdc/burn_cell.H
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ void burn_cell_c()
state_over_time << std::setw(10) << t;
state_over_time << std::setw(12) << burn_state.rho;
state_over_time << std::setw(12) << burn_state.T;
for (int x = 0; x < NumSpec; ++x){
state_over_time << std::setw(12) << burn_state.xn[x];
for (auto X : burn_state.xn) {
state_over_time << std::setw(12) << X;
}
state_over_time << std::endl;

Expand Down

0 comments on commit 8420bc3

Please sign in to comment.