From 9bb219af8eb12cbb128a78870e54c2bfd7b81697 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 2 Aug 2020 22:11:52 -0400 Subject: [PATCH] Apply templated write_message to simulation.cpp --- src/simulation.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/simulation.cpp b/src/simulation.cpp index 92cee64cd..def9cee5d 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -307,8 +307,7 @@ void initialize_batch() ++simulation::current_batch; if (settings::run_mode == RunMode::FIXED_SOURCE) { - int b = simulation::current_batch; - write_message("Simulating batch " + std::to_string(b), 6); + write_message(6, "Simulating batch {}", simulation::current_batch); } // Reset total starting particle weight used for normalizing tallies @@ -612,9 +611,8 @@ void initialize_data() double max_E = nuc->grid_[0].energy.back(); int neutron = static_cast(Particle::Type::neutron); if (max_E == data::energy_max[neutron]) { - write_message("Maximum neutron transport energy: " + - std::to_string(data::energy_max[neutron]) + " eV for " + - nuc->name_, 7); + write_message(7, "Maximum neutron transport energy: {} eV for {}", + data::energy_max[neutron], nuc->name_); if (mpi::master && data::energy_max[neutron] < 20.0e6) { warning("Maximum neutron energy is below 20 MeV. This may bias " "the results.");