35#include <dune/grid/common/mcmgmapper.hh>
36#include <opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp>
37#include <opm/grid/common/CartesianIndexMapper.hpp>
57template <
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_;
111template<
typename Gr
id,
typename Gr
idView>
112template<
typename Gr
idType>
113typename 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));
120template<
typename Gr
id,
typename Gr
idView>
121template<
typename Gr
idType>
122typename 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);
Interface class to access the logical Cartesian grid as used in industry standard simulator decks.
Definition CartesianIndexMapper.hpp:16
[ provides Dune::Grid ]
Definition CpGrid.hpp:203
The namespace Dune is the main namespace for all Dune code.
Definition CartesianIndexMapper.hpp:10
Holds the implementation of the CpGrid as a pimple.
Definition CellQuadrature.cpp:71
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
LookUpCellCentroid(const GridView &gridView, const Dune::CartesianIndexMapper< Grid > &cartMapper, const Opm::EclipseGrid *eclgrid)
: Constructor taking a GridView, CartesianMapper
Definition LookUpCellCentroid.hh:64