35 #include <dune/grid/common/mcmgmapper.hh> 36 #include <opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp> 37 #include <opm/grid/common/CartesianIndexMapper.hpp> 39 #include <type_traits> 57 template <
typename Gr
id,
typename Gr
idView>
66 const Opm::EclipseGrid* eclgrid) :
68 cartMapper_(&cartMapper),
83 template<
typename Gr
idType = Gr
id>
84 typename std::enable_if_t<!std::is_same_v<GridType,Dune::CpGrid>, std::array<double,3>>
97 template<
typename Gr
idType = Gr
id>
98 typename std::enable_if_t<std::is_same_v<GridType,Dune::CpGrid>, std::array<double,3>>
102 const GridView& gridView_;
104 const Opm::EclipseGrid* eclGrid_;
111 template<
typename Gr
id,
typename Gr
idView>
112 template<
typename Gr
idType>
113 typename std::enable_if_t<!std::is_same_v<GridType,Dune::CpGrid>, std::array<double,3>>
116 static_assert(std::is_same_v<Grid,GridType>);
117 return this -> eclGrid_ -> getCellCenter(
this -> cartMapper_->cartesianIndex(elemIdx));
120 template<
typename Gr
id,
typename Gr
idView>
121 template<
typename Gr
idType>
122 typename std::enable_if_t<std::is_same_v<GridType,Dune::CpGrid>,std::array<double,3>>
125 static_assert(std::is_same_v<Grid,GridType>);
126 return this -> gridView_.grid().getEclCentroid(elemIdx);
LookUpCellCentroid struct - To search cell centroids via element index.
Definition: LookUpCellCentroid.hh:58
The namespace Dune is the main namespace for all Dune code.
Definition: CartesianIndexMapper.hpp:9
Holds the implementation of the CpGrid as a pimple.
Definition: CellQuadrature.cpp:71
Interface class to access the logical Cartesian grid as used in industry standard simulator decks...
Definition: CartesianIndexMapper.hpp:15
LookUpCellCentroid(const GridView &gridView, const Dune::CartesianIndexMapper< Grid > &cartMapper, const Opm::EclipseGrid *eclgrid)
: Constructor taking a GridView, CartesianMapper
Definition: LookUpCellCentroid.hh:64
std::enable_if_t<!std::is_same_v< GridType, Dune::CpGrid >, std::array< double, 3 > > operator()(std::size_t elemIdx) const
: Call operator
Definition: LookUpCellCentroid.hh:114