Merge pull request #4942 from aritorto/updateLookUpData

Update LookUpData
This commit is contained in:
Markus Blatt 2023-10-25 11:00:52 +02:00 committed by GitHub
commit 70fcb864a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -380,7 +380,7 @@ protected:
auto getLookUpData(unsigned elemIdx) const
{
using GridType = std::remove_cv_t< typename std::remove_reference<decltype(gridView_.grid())>::type>;
return lookUpData_.template getOriginIndex<GridType>(elemIdx);
return lookUpData_.template getFieldPropIdx<GridType>(elemIdx);
}
private:

View File

@ -351,13 +351,11 @@ template<class GridView, class FluidSystem, class Scalar>
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
rockFraction(unsigned elementIdx, unsigned timeIdx) const
{
const auto& fp = eclState_.fieldProps();
const std::vector<double>& poro = fp.get_double("PORO");
// the reference porosity is defined as the accumulated pore volume divided by the
// geometric volume of the element. Note that it can
// be larger than 1.0 if porevolume multipliers are used
// to for instance implement larger boundary cells
Scalar porosity = poro[this->getLookUpData(elementIdx)];
auto porosity = this->lookUpData_.fieldPropDouble(eclState_.fieldProps(), "PORO", elementIdx);
return referencePorosity(elementIdx, timeIdx) / porosity * (1 - porosity);
}