Merge pull request #4942 from aritorto/updateLookUpData

Update LookUpData
This commit is contained in:
Markus Blatt authored and GitHub committed 2023-10-25 11:00:52 +02:00
commit 70fcb864a0
2 files changed
+2 -4

No files matched your search

+1 -1
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:
+1 -3
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);
}