|
| LookUpCellCentroid (const GridView &gridView, const Dune::CartesianIndexMapper< Grid > &cartMapper, const Opm::EclipseGrid *eclgrid) |
| : Constructor taking a GridView, CartesianMapper
|
|
template<typename GridType = Grid> |
std::enable_if_t<!std::is_same_v< GridType, Dune::CpGrid >, std::array< double, 3 > > | operator() (std::size_t elemIdx) const |
| : Call operator
|
|
template<typename GridType = Grid> |
std::enable_if_t< std::is_same_v< GridType, Dune::CpGrid >, std::array< double, 3 > > | operator() (std::size_t elemIdx) const |
| : Call operator
|
|
template<typename Grid, typename GridView>
struct Opm::LookUpCellCentroid< Grid, GridView >
LookUpCellCentroid struct - To search cell centroids via element index.
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 GridType >
: Call operator
For grids different from Dune::CpGrid, it takes an element index, and
returns its cell centroid, from an EclipseGrid.
- Template Parameters
-
GridType | Auxiliary type to overload the method, distinguishing general grids from CpGrid, with std::enable_if. Default: GridType = Grid. |
- Parameters
-
[in] | elemIdx | Element Index. |
- Returns
- centroid Centroid of the element, computed as in Eclipse.
template<typename Grid , typename GridView >
template<typename GridType >
: Call operator
For Dune::CpGrid, it returns a function, taking an integer,
returning cell centroid, computed as in Eclipse.
- Template Parameters
-
GridType | Auxiliary type to overload the method, distinguishing general grids from CpGrid, with std::enable_if. Default: GridType = Grid. |
- Returns
- centroid Element centroid, computed as in Eclipse.