AdaptiveTimeStepping: use fmt for formatting

This commit is contained in:
Arne Morten Kvarving 2025-01-02 15:21:54 +01:00
parent f0cb0595d1
commit 0465d3f0af

View File

@ -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);
}
}