mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: make sure we have valid indices in readInitialCondition_
quells warnings building flowexp_comp
This commit is contained in:
parent
5545f641e1
commit
6d8b5b204b
@ -1400,11 +1400,11 @@ protected:
|
||||
std::size_t numElems = this->model().numGridDof();
|
||||
for (std::size_t elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||
const auto& fs = asImp_().initialFluidStates()[elemIdx];
|
||||
if (!this->maxWaterSaturation_.empty())
|
||||
if (!this->maxWaterSaturation_.empty() && waterPhaseIdx > -1)
|
||||
this->maxWaterSaturation_[elemIdx] = std::max(this->maxWaterSaturation_[elemIdx], fs.saturation(waterPhaseIdx));
|
||||
if (!this->maxOilSaturation_.empty())
|
||||
if (!this->maxOilSaturation_.empty() && oilPhaseIdx > -1)
|
||||
this->maxOilSaturation_[elemIdx] = std::max(this->maxOilSaturation_[elemIdx], fs.saturation(oilPhaseIdx));
|
||||
if (!this->minRefPressure_.empty())
|
||||
if (!this->minRefPressure_.empty() && refPressurePhaseIdx_() > -1)
|
||||
this->minRefPressure_[elemIdx] = std::min(this->minRefPressure_[elemIdx], fs.pressure(refPressurePhaseIdx_()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user