Fix errors when Scalar = float
This commit is contained in:
@@ -83,7 +83,7 @@ public:
|
||||
: salinity_(salinity)
|
||||
{
|
||||
// Throw an error if reference state is not (T, p) = (15.56 C, 1 atm) = (288.71 K, 1.01325e5 Pa)
|
||||
if (T_ref != 288.71 || P_ref != 1.01325e5) {
|
||||
if (T_ref != Scalar(288.71) || P_ref != Scalar(1.01325e5)) {
|
||||
OPM_THROW(std::runtime_error,
|
||||
"BrineCo2Pvt class can only be used with default reference state (T, P) = (288.71 K, 1.01325e5 Pa)!");
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
: salinity_(salinity)
|
||||
{
|
||||
// Throw an error if reference state is not (T, p) = (15.56 C, 1 atm) = (288.71 K, 1.01325e5 Pa)
|
||||
if (T_ref != 288.71 || P_ref != 1.01325e5) {
|
||||
if (T_ref != Scalar(288.71) || P_ref != Scalar(1.01325e5)) {
|
||||
OPM_THROW(std::runtime_error,
|
||||
"BrineCo2Pvt class can only be used with default reference state (T, P) = (288.71 K, 1.01325e5 Pa)!");
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ initFromState(const EclipseState& eclState, const Schedule&)
|
||||
Scalar P_ref = eclState.getTableManager().stCond().pressure;
|
||||
|
||||
// Throw an error if STCOND is not (T, p) = (15.56 C, 1 atm) = (288.71 K, 1.01325e5 Pa)
|
||||
if (T_ref != 288.71 || P_ref != 1.01325e5) {
|
||||
if (T_ref != Scalar(288.71) || P_ref != Scalar(1.01325e5)) {
|
||||
OPM_THROW(std::runtime_error, "CO2STORE can only be used with default values for STCOND!");
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ initFromState(const EclipseState& eclState, const Schedule&)
|
||||
Scalar P_ref = eclState.getTableManager().stCond().pressure;
|
||||
|
||||
// Throw an error if STCOND is not (T, p) = (15.56 C, 1 atm) = (288.71 K, 1.01325e5 Pa)
|
||||
if (T_ref != 288.71 || P_ref != 1.01325e5) {
|
||||
if (T_ref != Scalar(288.71) || P_ref != Scalar(1.01325e5)) {
|
||||
OPM_THROW(std::runtime_error, "CO2STORE can only be used with default values for STCOND!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user