Skip to content

Commit 452b8b1

Browse files
authored
remove an unused compute of abar1_out in nse (#1520)
also clean up the logic some so it is clear we are using the value from the last nse table call
1 parent c7ac125 commit 452b8b1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

integration/nse_update_sdc.H

+2-3
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@ void nse_derivs(const amrex::Real rho0, const amrex::Real rhoe0, const amrex::Re
112112
// compute the temperature at t0 + tau
113113

114114
amrex::Real T1;
115-
amrex::Real abar1_out;
116115
amrex::Real Ye1 = rhoaux1[iye] / rho1;
117116

118117
if (T_fixed > 0) {
119118
T1 = T_fixed;
120-
abar1_out = rhoaux1[iabar] / rho1;
121119
} else {
120+
amrex::Real abar1_out{};
122121
amrex::Real e1 = rhoe1 / rho1;
123122
T1 = T0;
124123
nse_T_abar_from_e(rho1, e1, Ye1, T1, abar1_out);
@@ -137,7 +136,7 @@ void nse_derivs(const amrex::Real rho0, const amrex::Real rhoe0, const amrex::Re
137136
// update abar -- this will be the same as nse_T_abar_from_e, but
138137
// for the case with T_fixed > 0, this abar will be consistent
139138
// with NSE.
140-
abar1_out = nse_state.abar;
139+
amrex::Real abar1_out = nse_state.abar;
141140

142141
// construct the finite-difference approximation to the derivatives
143142

0 commit comments

Comments
 (0)