ImmiscibleFlash: remove use of sstream

This commit is contained in:
Arne Morten Kvarving 2023-01-02 08:46:32 +01:00
parent 4927a9a58e
commit a885d4de34

View File

@ -40,7 +40,6 @@
#include <dune/common/version.hh>
#include <limits>
#include <sstream>
namespace Opm {
@ -217,11 +216,13 @@ public:
}
}
std::ostringstream oss;
oss << "ImmiscibleFlash solver failed:"
<< " {c_alpha^kappa} = {" << globalMolarities << "},"
<< " T = " << fluidState.temperature(/*phaseIdx=*/0);
throw NumericalProblem(oss.str());
std::string msg = "ImmiscibleFlash solver failed: "
"{c_alpha^kappa} = {";
for (const auto& v : globalMolarities)
msg += " " + std::to_string(v);
msg += " }, T = ";
msg += std::to_string(fluidState.temperature(/*phaseIdx=*/0));
throw NumericalProblem(msg);
}