mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-30 13:03:49 -06:00
ignore the PORV grid property
this is required because that property is "drive-by created" when initializing the grid and the code in opm-autodiff ignores it. (and is slightly inconsistent with what opm-parser does...)
This commit is contained in:
parent
a235321076
commit
dd3bf51262
@ -814,21 +814,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
// overwrite the porosity using the PORV keyword for the elements for which PORV
|
||||
// is defined...
|
||||
if (eclState->hasDoubleGridProperty("PORV")) {
|
||||
const std::vector<double> &porvData =
|
||||
eclState->getDoubleGridProperty("PORV")->getData();
|
||||
|
||||
for (size_t dofIdx = 0; dofIdx < numDof; ++ dofIdx) {
|
||||
unsigned cartesianElemIdx = gridManager.cartesianIndex(dofIdx);
|
||||
if (std::isfinite(porvData[cartesianElemIdx])) {
|
||||
Scalar dofVolume = this->simulator().model().dofTotalVolume(dofIdx);
|
||||
porosity_[dofIdx] = porvData[cartesianElemIdx]/dofVolume;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// apply the NTG keyword to the porosity
|
||||
if (eclState->hasDoubleGridProperty("NTG")) {
|
||||
const std::vector<double> &ntgData =
|
||||
@ -847,6 +832,27 @@ private:
|
||||
porosity_[dofIdx] *= multpvData[gridManager.cartesianIndex(dofIdx)];
|
||||
}
|
||||
|
||||
// overwrite the porosity using the PORV keyword for the elements for which PORV
|
||||
// is defined...
|
||||
//
|
||||
// HACK: the PORV keyword is currently always present because the grid managers
|
||||
// for ebos all need to "drive-by create" it to initialize the grid structures :(
|
||||
// (WTF: why is eclState->getDoubleGridProperty() marked as 'const' even though
|
||||
// it alters the external semantics of the object?) since the FLOW simulator from
|
||||
// opm-autodiff ignored it so far, we do so as well.
|
||||
if (false && eclState->hasDoubleGridProperty("PORV")) {
|
||||
const std::vector<double> &porvData =
|
||||
eclState->getDoubleGridProperty("PORV")->getData();
|
||||
|
||||
for (size_t dofIdx = 0; dofIdx < numDof; ++ dofIdx) {
|
||||
unsigned cartesianElemIdx = gridManager.cartesianIndex(dofIdx);
|
||||
if (std::isfinite(porvData[cartesianElemIdx])) {
|
||||
Scalar dofVolume = this->simulator().model().dofTotalVolume(dofIdx);
|
||||
porosity_[dofIdx] = porvData[cartesianElemIdx]/dofVolume;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the fluid-matrix interactions for ECL problems are dealt with by a separate class
|
||||
std::vector<int> compressedToCartesianElemIdx(numDof);
|
||||
for (unsigned elemIdx = 0; elemIdx < numDof; ++elemIdx)
|
||||
|
Loading…
Reference in New Issue
Block a user