mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5064 from aritorto/lookupAssigner
lookupIdxOnLevelZeroAssigner added
This commit is contained in:
commit
acc08799a4
@ -377,6 +377,15 @@ protected:
|
||||
using LookUpData = Opm::LookUpData<Grid,GridView>;
|
||||
const LookUpData lookUpData_;
|
||||
|
||||
// \brief Function to assign the origin cell index on level zero, for a cell on the leaf grid view.
|
||||
//
|
||||
// For CpGrid with local grid refinement, the field property of a cell on the leaf
|
||||
// is inherited from its parent or equivalent (when has no parent) cell on level zero.
|
||||
std::function<unsigned(unsigned)> lookupIdxOnLevelZeroAssigner_()
|
||||
{
|
||||
return [this](unsigned elemIdx) { return lookUpData_.template getFieldPropIdx<Grid>(elemIdx);};
|
||||
}
|
||||
|
||||
private:
|
||||
template<class T>
|
||||
void updateNum(const std::string& name, std::vector<T>& numbers, std::size_t num_regions);
|
||||
|
@ -2018,7 +2018,8 @@ protected:
|
||||
materialLawManager_ = std::make_shared<EclMaterialLawManager>();
|
||||
materialLawManager_->initFromState(eclState);
|
||||
materialLawManager_->initParamsForElements(eclState, this->model().numGridDof(),
|
||||
this-> template fieldPropIntTypeOnLeafAssigner_<int>());
|
||||
this-> template fieldPropIntTypeOnLeafAssigner_<int>(),
|
||||
this-> lookupIdxOnLevelZeroAssigner_());
|
||||
////////////////////////////////
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user