Skip to content

Commit b45e502

Browse files
authored
display state.xn in scientific notation (#1643)
If state.xn contains number densities (e.g., for primordial and metal chemistry), it can be hard to read large values when they are not printed in scientific format. This is not an issue for other cases where mass fractions are being used, since they are always <=1 .
1 parent 8ce3375 commit b45e502

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integration/integrator_setup_strang.H

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,14 @@ void integrator_cleanup (IntegratorT& int_state, BurnT& state,
210210
std::cout << "temp start = " << std::setprecision(16) << state_save.T_in << std::endl;
211211
std::cout << "xn start = ";
212212
for (const double X : state_save.xn_in) {
213-
std::cout << std::setprecision(16) << X << " ";
213+
std::cout << std::scientific << std::setprecision(16) << X << " ";
214214
}
215215
std::cout << std::endl;
216216
std::cout << "dens current = " << std::setprecision(16) << state.rho << std::endl;
217217
std::cout << "temp current = " << std::setprecision(16) << state.T << std::endl;
218218
std::cout << "xn current = ";
219219
for (const double X : state.xn) {
220-
std::cout << std::setprecision(16) << X << " ";
220+
std::cout << std::scientific << std::setprecision(16) << X << " ";
221221
}
222222
std::cout << std::endl;
223223
std::cout << "energy generated = " << state.e << std::endl;

0 commit comments

Comments
 (0)