NcpFlash: remove use of sstream

This commit is contained in:
Arne Morten Kvarving 2023-01-02 08:46:32 +01:00
parent 86d233ba96
commit 30b408c95f

View File

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