|
| LookUpData (const GridView &gridView, bool isFieldPropInLgr=false) |
| : Constructor taking a GridView and a bool
|
|
template<typename FieldPropType > |
FieldPropType | operator() (const int &elemIdx, const std::vector< FieldPropType > &fieldProp) const |
| : Get field propertry for an element in the leaf grid view, from a vector and element index.
|
|
template<typename EntityType , typename FieldPropType > |
std::enable_if_t<!std::is_same_v< EntityType, unsigned int >, FieldPropType > | operator() (const EntityType &elem, const std::vector< FieldPropType > &fieldProp) const |
| : Get field propertry for an element in the leaf grid view, from a vector.
|
|
std::vector< double > | assignFieldPropsDoubleOnLeaf (const FieldPropsManager &fieldPropsManager, const std::string &propString) const |
| : Get field property of type double from field properties manager by name.
|
|
template<typename IntType > |
std::vector< IntType > | assignFieldPropsIntOnLeaf (const FieldPropsManager &fieldPropsManager, const std::string &propString, const bool &needsTranslation, std::function< void(IntType, int)> valueCheck=[](IntType, int){}) const |
| : Get field property of type int from field properties manager by name.
|
|
template<typename ElemOrIndex > |
double | fieldPropDouble (const FieldPropsManager &fieldPropsManager, const std::string &propString, const ElemOrIndex &elemOrIndex) const |
| : Get property of type double from field properties manager by name, via element or its index.
|
|
template<typename ElemOrIndex > |
int | fieldPropInt (const FieldPropsManager &fieldPropsManager, const std::string &propString, const ElemOrIndex &elemOrIndex) const |
| : Get property of type int from field properties manager by name, via element.
|
|
template<typename EntityType , typename GridType = Grid> |
std::enable_if_t<!std::is_same_v< GridType, Dune::CpGrid > &&!std::is_same_v< EntityType, unsigned int >, int > | getFieldPropIdx (const EntityType &elem) const |
| : Return the same element index for all grids different from CpGrid.
|
|
template<typename EntityType , typename GridType = Grid> |
std::enable_if_t< std::is_same_v< GridType, Dune::CpGrid > &&!std::is_same_v< EntityType, unsigned int >, int > | getFieldPropIdx (const EntityType &elem) const |
| : Return index to search for the field propertries, for CpGrids.
|
|
template<typename GridType > |
std::enable_if_t<!std::is_same_v< GridType, Dune::CpGrid >, int > | getFieldPropIdx (const int &elemIdx) const |
| : Return the same element index for all grids different from CpGrid.
|
|
template<typename GridType = Grid> |
std::enable_if_t< std::is_same_v< GridType, Dune::CpGrid >, int > | getFieldPropIdx (const int &elemIdx) const |
| : Return the index to search for the field properties, for CpGrids.
|
|
template<typename Grid, typename GridView>
class Opm::LookUpData< Grid, GridView >
LookUpData class - To search field properties of leaf grid view elements via element/elementIndex.
Instead of using a specialitation for Dune::CpGrid, we implement std::enable_if to overload methods with different definitions: for Dune:CpGrid and for other Grid types. An auxiliary defualt template parameter (GridType = Grid) is added to deal with the dependent names at template instantiation.
template<typename Grid , typename GridView >
template<typename EntityType , typename FieldPropType >
std::enable_if_t<!std::is_same_v< EntityType, unsigned int >, FieldPropType > Opm::LookUpData< Grid, GridView >::operator() |
( |
const EntityType & |
elem, |
|
|
const std::vector< FieldPropType > & |
fieldProp |
|
) |
| const |
: Get field propertry for an element in the leaf grid view, from a vector.
For general grids, the field property vector is assumed to be given for the gridView_.
For CpGrid, the field property vector is assumed to be given for level 0 when isFieldPropLgr_ == false,
and for certain LGR/level > 0 when isFieldPropLgr_ == true.
template<typename Grid , typename GridView >
template<typename FieldPropType >
FieldPropType Opm::LookUpData< Grid, GridView >::operator() |
( |
const int & |
elemIdx, |
|
|
const std::vector< FieldPropType > & |
fieldProp |
|
) |
| const |
: Get field propertry for an element in the leaf grid view, from a vector and element index.
LookUpData.
For general grids, the field property vector is assumed to be given for the gridView_.
For CpGrid, the field property vector is assumed to be given for level 0 when isFieldPropLgr_ == false,
and for certain LGR/level > 0 when isFieldPropLgr_ == true.