BrineCo2Pvt: remove use of sstream

This commit is contained in:
Arne Morten Kvarving 2023-01-02 10:07:34 +01:00
parent cbb3b9da7f
commit b3cd20aa69

View File

@ -39,7 +39,6 @@
#include <opm/material/binarycoefficients/H2O_CO2.hpp>
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
#include <sstream>
#include <vector>
namespace Opm {
@ -397,16 +396,18 @@ private:
Valgrind::CheckDefined(xlCO2);
if(!extrapolate && T < 273.15) {
std::ostringstream oss;
oss << "Liquid density for Brine and CO2 is only "
"defined above 273.15K (is "<<T<<"K)";
throw NumericalProblem(oss.str());
const std::string msg =
"Liquid density for Brine and CO2 is only "
"defined above 273.15K (is " +
std::to_string(getValue(T)) + "K)";
throw NumericalProblem(msg);
}
if(!extrapolate && pl >= 2.5e8) {
std::ostringstream oss;
oss << "Liquid density for Brine and CO2 is only "
"defined below 250MPa (is "<<pl<<"Pa)";
throw NumericalProblem(oss.str());
const std::string msg =
"Liquid density for Brine and CO2 is only "
"defined below 250MPa (is " +
std::to_string(getValue(pl)) + "Pa)";
throw NumericalProblem(msg);
}
const LhsEval& rho_brine = Brine::liquidDensity(T, pl, extrapolate);