mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: pass the mcmg element layout as a parameter for dune 2.6
the template parameter is deprecated
This commit is contained in:
parent
2aa0043550
commit
4945c9b2ed
@ -711,13 +711,20 @@ namespace Opm
|
|||||||
if( output && output_ecl && grid().comm().size() > 1 )
|
if( output && output_ecl && grid().comm().size() > 1 )
|
||||||
{
|
{
|
||||||
typedef typename Grid::LeafGridView GridView;
|
typedef typename Grid::LeafGridView GridView;
|
||||||
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
|
#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
|
||||||
|
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
|
||||||
|
#else
|
||||||
// Get the owner rank number for each cell
|
// Get the owner rank number for each cell
|
||||||
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
|
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
|
||||||
|
#endif
|
||||||
using Handle = CellOwnerDataHandle<ElementMapper>;
|
using Handle = CellOwnerDataHandle<ElementMapper>;
|
||||||
const Grid& globalGrid = this->globalGrid();
|
const Grid& globalGrid = this->globalGrid();
|
||||||
const auto& globalGridView = globalGrid.leafGridView();
|
const auto& globalGridView = globalGrid.leafGridView();
|
||||||
|
#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
|
||||||
|
ElementMapper globalMapper(globalGridView, Dune::mcmgElementLayout());
|
||||||
|
#else
|
||||||
ElementMapper globalMapper(globalGridView);
|
ElementMapper globalMapper(globalGridView);
|
||||||
|
#endif
|
||||||
const auto globalSize = globalGrid.size(0);
|
const auto globalSize = globalGrid.size(0);
|
||||||
std::vector<int> ranks(globalSize, -1);
|
std::vector<int> ranks(globalSize, -1);
|
||||||
Handle handle(globalMapper, ranks);
|
Handle handle(globalMapper, ranks);
|
||||||
@ -746,8 +753,13 @@ namespace Opm
|
|||||||
const Grid& globalGrid = this->globalGrid();
|
const Grid& globalGrid = this->globalGrid();
|
||||||
const auto& globalGridView = globalGrid.leafGridView();
|
const auto& globalGridView = globalGrid.leafGridView();
|
||||||
typedef typename Grid::LeafGridView GridView;
|
typedef typename Grid::LeafGridView GridView;
|
||||||
|
#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
|
||||||
|
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
|
||||||
|
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
||||||
|
#else
|
||||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
|
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
|
||||||
ElementMapper globalElemMapper(globalGridView);
|
ElementMapper globalElemMapper(globalGridView);
|
||||||
|
#endif
|
||||||
const auto& cartesianCellIdx = globalGrid.globalCell();
|
const auto& cartesianCellIdx = globalGrid.globalCell();
|
||||||
|
|
||||||
const auto* globalTrans = &(ebosSimulator_->gridManager().globalTransmissibility());
|
const auto* globalTrans = &(ebosSimulator_->gridManager().globalTransmissibility());
|
||||||
@ -816,8 +828,13 @@ namespace Opm
|
|||||||
const Grid& globalGrid = this->globalGrid();
|
const Grid& globalGrid = this->globalGrid();
|
||||||
const auto& globalGridView = globalGrid.leafGridView();
|
const auto& globalGridView = globalGrid.leafGridView();
|
||||||
typedef typename Grid::LeafGridView GridView;
|
typedef typename Grid::LeafGridView GridView;
|
||||||
|
#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
|
||||||
|
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
|
||||||
|
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
||||||
|
#else
|
||||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
|
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
|
||||||
ElementMapper globalElemMapper(globalGridView);
|
ElementMapper globalElemMapper(globalGridView);
|
||||||
|
#endif
|
||||||
|
|
||||||
const auto* globalTrans = &(ebosSimulator_->gridManager().globalTransmissibility());
|
const auto* globalTrans = &(ebosSimulator_->gridManager().globalTransmissibility());
|
||||||
if (grid().comm().size() < 2) {
|
if (grid().comm().size() < 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user