Skip to content

Commit

Permalink
display state.xn in scientific notation (#1643)
Browse files Browse the repository at this point in the history
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 .
  • Loading branch information
psharda authored Aug 27, 2024
1 parent 8ce3375 commit b45e502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration/integrator_setup_strang.H
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,14 @@ void integrator_cleanup (IntegratorT& int_state, BurnT& state,
std::cout << "temp start = " << std::setprecision(16) << state_save.T_in << std::endl;
std::cout << "xn start = ";
for (const double X : state_save.xn_in) {
std::cout << std::setprecision(16) << X << " ";
std::cout << std::scientific << std::setprecision(16) << X << " ";
}
std::cout << std::endl;
std::cout << "dens current = " << std::setprecision(16) << state.rho << std::endl;
std::cout << "temp current = " << std::setprecision(16) << state.T << std::endl;
std::cout << "xn current = ";
for (const double X : state.xn) {
std::cout << std::setprecision(16) << X << " ";
std::cout << std::scientific << std::setprecision(16) << X << " ";
}
std::cout << std::endl;
std::cout << "energy generated = " << state.e << std::endl;
Expand Down

0 comments on commit b45e502

Please sign in to comment.