Move lookupAssigner to remove shadow decl warnings

This commit is contained in:
Antonella Ritorto 2023-12-14 19:59:55 +01:00
parent 1f77b0c199
commit bba5833332
2 changed files with 9 additions and 12 deletions

View File

@ -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);

View File

@ -1987,18 +1987,6 @@ protected:
};
}
// \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_()
{
const auto& lookup = this->lookUpData_;
// Get Grid Type
using GridType = std::remove_cv_t< typename std::remove_reference<decltype(this->gridView().grid())>::type>;
return [&lookup](unsigned elemIdx) { return lookup.template getFieldPropIdx<GridType>(elemIdx);};
}
void readMaterialParameters_()
{
OPM_TIMEBLOCK(readMaterialParameters);