34 #ifndef OPM_ALUGRIDLEVELCARTESIANINDEXMAPPER_HPP 35 #define OPM_ALUGRIDLEVELCARTESIANINDEXMAPPER_HPP 37 #include <dune/alugrid/grid.hh> 38 #include <opm/grid/common/LevelCartesianIndexMapper.hpp> 39 #include <opm/simulators/flow/AluGridCartesianIndexMapper.hpp> 60 using Grid = Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming, Dune::ALUGridMPIComm>;
62 using Grid = Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming, Dune::ALUGridNoComm>;
66 static constexpr
int dimension = 3 ;
69 : cartesianIndexMapper_{std::make_unique<Dune::CartesianIndexMapper<Grid>>(cartesianIndexMapper)}
72 const std::array<int,3>& cartesianDimensions(
int level)
const 74 throwIfLevelPositive(level);
75 return cartesianIndexMapper_ ->cartesianDimensions();
78 int cartesianSize(
int level)
const 80 throwIfLevelPositive(level);
81 return cartesianIndexMapper_->cartesianSize();
84 int compressedSize(
int level)
const 86 throwIfLevelPositive(level);
87 return cartesianIndexMapper_-> compressedSize();
90 int cartesianIndex(
const int compressedElementIndex,
const int level)
const 92 throwIfLevelPositive(level);;
93 return cartesianIndexMapper_->cartesianIndex(compressedElementIndex);
96 void cartesianCoordinate(
const int compressedElementIndex, std::array<int,dimension>& coords,
int level)
const 98 throwIfLevelPositive(level);
99 cartesianIndexMapper_->cartesianCoordinate(compressedElementIndex, coords);
103 std::unique_ptr<Dune::CartesianIndexMapper<Grid>> cartesianIndexMapper_;
105 void throwIfLevelPositive(
int level)
const 108 throw std::invalid_argument(
"Invalid level.\n");
Definition: EclGenericWriter.hpp:50
Definition: fvbaseprimaryvariables.hh:161
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
Definition: CollectDataOnIORank.hpp:49