mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
use enableEnergy
consistently
thanks to [at]totto82 for noticing.
This commit is contained in:
parent
6a29318adf
commit
af0d02b03d
@ -217,6 +217,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// always allocate memory for temperature
|
||||
temperature_.resize(bufferSize, 0.0);
|
||||
|
||||
// Only provide restart on restart steps
|
||||
if (!restartConfig.getWriteRestartFile(reportStepNum, log) || substep)
|
||||
return;
|
||||
@ -230,7 +233,6 @@ public:
|
||||
}
|
||||
// and oil pressure
|
||||
oilPressure_.resize(bufferSize, 0.0);
|
||||
temperature_.resize(bufferSize, 0.0);
|
||||
|
||||
if (FluidSystem::enableDissolvedGas())
|
||||
rs_.resize(bufferSize, 0.0);
|
||||
@ -385,7 +387,7 @@ public:
|
||||
Opm::Valgrind::CheckDefined(oilPressure_[globalDofIdx]);
|
||||
}
|
||||
|
||||
if (temperature_.size() > 0) {
|
||||
if (enableEnergy) {
|
||||
temperature_[globalDofIdx] = Opm::getValue(fs.temperature(oilPhaseIdx));
|
||||
Opm::Valgrind::CheckDefined(temperature_[globalDofIdx]);
|
||||
}
|
||||
@ -961,7 +963,7 @@ public:
|
||||
|
||||
if (oilPressure_.size() > 0 && sol.has("PRESSURE"))
|
||||
oilPressure_[elemIdx] = sol.data("PRESSURE")[globalDofIndex];
|
||||
if (temperature_.size() > 0 && sol.has("TEMP"))
|
||||
if (enableEnergy && sol.has("TEMP"))
|
||||
temperature_[elemIdx] = sol.data("TEMP")[globalDofIndex];
|
||||
if (rs_.size() > 0 && sol.has("RS"))
|
||||
rs_[elemIdx] = sol.data("RS")[globalDofIndex];
|
||||
@ -1019,7 +1021,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (temperature_.size() > 0)
|
||||
if (enableEnergy)
|
||||
fs.setTemperature(temperature_[elemIdx]);
|
||||
if (rs_.size() > 0)
|
||||
fs.setRs(rs_[elemIdx]);
|
||||
|
Loading…
Reference in New Issue
Block a user