mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4942 from aritorto/updateLookUpData
Update LookUpData
This commit is contained in:
commit
70fcb864a0
@ -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:
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user