BrineCO2FluidSystem: remove use of sstream
This commit is contained in:
parent
55c5bc68d5
commit
587ffe4d78
@ -45,8 +45,6 @@
|
|||||||
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
|
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
|
||||||
#include <opm/material/binarycoefficients/H2O_N2.hpp>
|
#include <opm/material/binarycoefficients/H2O_N2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -485,17 +483,28 @@ private:
|
|||||||
Valgrind::CheckDefined(xlH2O);
|
Valgrind::CheckDefined(xlH2O);
|
||||||
Valgrind::CheckDefined(xlCO2);
|
Valgrind::CheckDefined(xlCO2);
|
||||||
|
|
||||||
|
auto tostring = [](const auto& val) -> std::string
|
||||||
|
{
|
||||||
|
if constexpr (DenseAd::is_evaluation<LhsEval>::value) {
|
||||||
|
return std::to_string(getValue(val.value()));
|
||||||
|
} else {
|
||||||
|
return std::to_string(val);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if(T < 273.15) {
|
if(T < 273.15) {
|
||||||
std::ostringstream oss;
|
const std::string msg =
|
||||||
oss << "Liquid density for Brine and CO2 is only "
|
"Liquid density for Brine and CO2 is only "
|
||||||
"defined above 273.15K (is "<<T<<"K)";
|
"defined above 273.15K (is +"
|
||||||
throw NumericalProblem(oss.str());
|
+ tostring(T)+ "K)";
|
||||||
|
throw NumericalProblem(msg);
|
||||||
}
|
}
|
||||||
if(pl >= 2.5e8) {
|
if(pl >= 2.5e8) {
|
||||||
std::ostringstream oss;
|
const std::string msg =
|
||||||
oss << "Liquid density for Brine and CO2 is only "
|
"Liquid density for Brine and CO2 is only "
|
||||||
"defined below 250MPa (is "<<pl<<"Pa)";
|
"defined below 250MPa (is "
|
||||||
throw NumericalProblem(oss.str());
|
+ tostring(pl) + "Pa)";
|
||||||
|
throw NumericalProblem(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
const LhsEval& rho_brine = Brine::liquidDensity(T, pl);
|
const LhsEval& rho_brine = Brine::liquidDensity(T, pl);
|
||||||
|
Loading…
Reference in New Issue
Block a user