Merge pull request #2372 from akva2/compressed_props_material

Use compressed properties in material law setup
This commit is contained in:
Markus Blatt 2020-03-02 09:47:09 +01:00 committed by GitHub
commit 396f84b764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 13 deletions

View File

@ -2326,11 +2326,6 @@ private:
////////////////////////////////
// fluid-matrix interactions (saturation functions; relperm/capillary pressure)
size_t numDof = this->model().numGridDof();
std::vector<int> compressedToCartesianElemIdx(numDof);
for (unsigned elemIdx = 0; elemIdx < numDof; ++elemIdx)
compressedToCartesianElemIdx[elemIdx] = vanguard.cartesianIndex(elemIdx);
materialLawManager_ = std::make_shared<EclMaterialLawManager>();
if (comm.rank() == 0)
materialLawManager_->initFromDeck(deck, eclState);
@ -2338,7 +2333,7 @@ private:
EclMpiSerializer ser(comm);
ser.broadcast(*materialLawManager_);
materialLawManager_->initParamsForElements(eclState, compressedToCartesianElemIdx);
materialLawManager_->initParamsForElements(eclState, this->model().numGridDof());
////////////////////////////////
}
@ -2352,13 +2347,8 @@ private:
const auto& eclState = vanguard.eclState();
// fluid-matrix interactions (saturation functions; relperm/capillary pressure)
size_t numDof = this->model().numGridDof();
std::vector<int> compressedToCartesianElemIdx(numDof);
for (unsigned elemIdx = 0; elemIdx < numDof; ++elemIdx)
compressedToCartesianElemIdx[elemIdx] = vanguard.cartesianIndex(elemIdx);
thermalLawManager_ = std::make_shared<EclThermalLawManager>();
thermalLawManager_->initParamsForElements(eclState, compressedToCartesianElemIdx);
thermalLawManager_->initParamsForElements(eclState, this->model().numGridDof());
}
void updateReferencePorosity_()

View File

@ -56,7 +56,7 @@ namespace Opm {
const auto dims = Opm::UgGridHelpers::cartDims(grid);
const auto& compressedToCartesianIdx = Opm::compressedToCartesian(nc, global_cell);
scaledEpsInfo_.resize(nc);
EclEpsGridProperties epsGridProperties(eclState, false, compressedToCartesianIdx);
EclEpsGridProperties epsGridProperties(eclState, false);
const std::string tag = "Scaled endpoints";
for (int c = 0; c < nc; ++c) {
const std::string satnumIdx = std::to_string(epsGridProperties.satRegion(c));