mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
output temperature if TEMP is set in RPTRST or THERMAL is set in RUNSPEC
This commit is contained in:
parent
525cc76d62
commit
c62e6ab5cd
@ -825,15 +825,10 @@ assignToSolution(data::Solution& sol)
|
|||||||
doInsert(array, data::TargetType::RESTART_OPM_EXTENDED);
|
doInsert(array, data::TargetType::RESTART_OPM_EXTENDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->enableEnergy_ || this->enableTemperature_) &&
|
if (! this->temperature_.empty())
|
||||||
! this->temperature_.empty())
|
|
||||||
{
|
{
|
||||||
const auto tag = this->enableEnergy_
|
|
||||||
? data::TargetType::RESTART_SOLUTION
|
|
||||||
: data::TargetType::RESTART_OPM_EXTENDED;
|
|
||||||
|
|
||||||
sol.insert("TEMP", UnitSystem::measure::temperature,
|
sol.insert("TEMP", UnitSystem::measure::temperature,
|
||||||
std::move(this->temperature_), tag);
|
std::move(this->temperature_), data::TargetType::RESTART_SOLUTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
||||||
@ -1143,8 +1138,9 @@ doAllocBuffers(unsigned bufferSize,
|
|||||||
rstKeywords["PRES"] = 0;
|
rstKeywords["PRES"] = 0;
|
||||||
rstKeywords["PRESSURE"] = 0;
|
rstKeywords["PRESSURE"] = 0;
|
||||||
|
|
||||||
// Allocate memory for temperature
|
// If TEMP is set in RPTRST we output temperature even if THERMAL
|
||||||
if (enableEnergy_ || enableTemperature_) {
|
// is not activated
|
||||||
|
if (enableEnergy_ || rstKeywords["TEMP"] > 0) {
|
||||||
this->temperature_.resize(bufferSize, 0.0);
|
this->temperature_.resize(bufferSize, 0.0);
|
||||||
rstKeywords["TEMP"] = 0;
|
rstKeywords["TEMP"] = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user