fix the calculation of which ROCK region is to be used

the mistake was that I assumed that this was specified by the ROCKTAB
keyword; It is not! (It's specified via PVTNUM or SATNUM depending on
the value of the third item of the ROCKOPTS keyword. for now, let's
only use the PVTNUM.)
This commit is contained in:
Andreas Lauser 2015-07-29 13:41:12 +02:00
parent 8c843dd05b
commit 48f889d980

View File

@ -664,6 +664,7 @@ private:
{ {
auto deck = this->simulator().gridManager().deck(); auto deck = this->simulator().gridManager().deck();
auto eclState = this->simulator().gridManager().eclState(); auto eclState = this->simulator().gridManager().eclState();
const auto& gridManager = this->simulator().gridManager();
// the ROCK keyword has not been specified, so we don't need // the ROCK keyword has not been specified, so we don't need
// to read rock parameters // to read rock parameters
@ -680,16 +681,20 @@ private:
rockRecord->getItem("COMPRESSIBILITY")->getSIDouble(0); rockRecord->getItem("COMPRESSIBILITY")->getSIDouble(0);
} }
// ROCKTAB has not been specified, so everything is in the // PVTNUM has not been specified, so everything is in the first region and we
// first region and we don't need to care... // don't need to care...
if (!eclState->hasIntGridProperty("ROCKTAB")) if (!eclState->hasIntGridProperty("PVTNUM"))
return; return;
const std::vector<int>& rocktabData = const std::vector<int>& pvtnumData =
eclState->getIntGridProperty("ROCKTAB")->getData(); eclState->getIntGridProperty("PVTNUM")->getData();
for (size_t elemIdx = 0; elemIdx < rocktabData.size(); ++ elemIdx) rockTableIdx_.resize(gridManager.gridView().size(/*codim=*/0));
// reminder: Eclipse uses FORTRAN indices for (size_t elemIdx = 0; elemIdx < rockTableIdx_.size(); ++ elemIdx) {
rockTableIdx_[elemIdx] = rocktabData[elemIdx] - 1; int cartElemIdx = gridManager.cartesianCellId(elemIdx);
// reminder: Eclipse uses FORTRAN-style indices
rockTableIdx_[elemIdx] = pvtnumData[cartElemIdx] - 1;
}
} }
void readMaterialParameters_() void readMaterialParameters_()