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/H2O_N2.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
/*!
|
||||
@ -485,17 +483,28 @@ private:
|
||||
Valgrind::CheckDefined(xlH2O);
|
||||
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) {
|
||||
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 +"
|
||||
+ tostring(T)+ "K)";
|
||||
throw NumericalProblem(msg);
|
||||
}
|
||||
if(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 "
|
||||
+ tostring(pl) + "Pa)";
|
||||
throw NumericalProblem(msg);
|
||||
}
|
||||
|
||||
const LhsEval& rho_brine = Brine::liquidDensity(T, pl);
|
||||
|
Loading…
Reference in New Issue
Block a user