From 27e102066604e14db4ababa38c773e51398942ab 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 volume_calc.cpp --- src/volume_calc.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/volume_calc.cpp b/src/volume_calc.cpp index d1b14e3296..96ef55234c 100644 --- a/src/volume_calc.cpp +++ b/src/volume_calc.cpp @@ -468,9 +468,7 @@ int openmc_calculate_volumes() { time_volume.start(); for (int i = 0; i < model::volume_calcs.size(); ++i) { - if (mpi::master) { - write_message(fmt::format("Running volume calculation {}...", i + 1), 4); - } + write_message(4, "Running volume calculation {}", i+1); // Run volume calculation const auto& vol_calc {model::volume_calcs[i]}; @@ -488,8 +486,8 @@ int openmc_calculate_volumes() { // Display domain volumes for (int j = 0; j < vol_calc.domain_ids_.size(); j++) { - write_message(fmt::format("{}{}: {} +/- {} cm^3", domain_type, - vol_calc.domain_ids_[j], results[j].volume[0], results[j].volume[1]), 4); + write_message(4, "{}{}: {} +/- {} cm^3", domain_type, + vol_calc.domain_ids_[j], results[j].volume[0], results[j].volume[1]); } // Write volumes to HDF5 file @@ -502,9 +500,7 @@ int openmc_calculate_volumes() { // Show elapsed time time_volume.stop(); - if (mpi::master) { - write_message(fmt::format("Elapsed time: {} s", time_volume.elapsed()), 6); - } + write_message(6, "Elapsed time: {} s", time_volume.elapsed()); return 0; }