From 0465d3f0aff09489ebb3ce977b971556834e4420 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Thu, 2 Jan 2025 15:21:54 +0100 Subject: [PATCH] AdaptiveTimeStepping: use fmt for formatting --- .../timestepping/AdaptiveTimeStepping_impl.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp index 42c6fa479..647235edf 100644 --- a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp @@ -352,13 +352,10 @@ step(const SimulatorTimer& simulatorTimer, } else { substepTimer.provideTimeStepEstimate(dt); if (solverVerbose_) { - std::string msg; - msg = "\nProblematic well(s) were shut: "; - for (const auto& well : shut_wells) { - msg += well; - msg += " "; - } - msg += "(retrying timestep)\n"; + const std::string msg = + fmt::format("\nProblematic well(s) were shut: {}" + "(retrying timestep)\n", + fmt::join(shut_wells, " ")); OpmLog::problem(msg); } }