mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix the dune 2.4 deprecation warnings
mainly this boils down to mapper.map(e) -> mapper.index(e)
This commit is contained in:
@@ -125,10 +125,9 @@ public:
|
|||||||
Dune::FieldVector<int, dim> cellRes;
|
Dune::FieldVector<int, dim> cellRes;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Dune::FieldVector<Scalar, dim> upperRight;
|
typedef double GridScalar;
|
||||||
Dune::FieldVector<Scalar, dim> lowerLeft;
|
Dune::FieldVector<GridScalar, dim> upperRight;
|
||||||
|
|
||||||
lowerLeft[1] = 0.0;
|
|
||||||
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
|
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
|
||||||
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
|
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
|
||||||
|
|
||||||
@@ -140,13 +139,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned numRefinements = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
unsigned numRefinements = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
||||||
|
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
|
||||||
|
gridPtr_.reset(new Dune::YaspGrid<dim>(upperRight, cellRes));
|
||||||
|
#else
|
||||||
gridPtr_.reset(new Dune::YaspGrid<dim>(
|
gridPtr_.reset(new Dune::YaspGrid<dim>(
|
||||||
#ifdef HAVE_MPI
|
#ifdef HAVE_MPI
|
||||||
/*mpiCommunicator=*/Dune::MPIHelper::getCommunicator(),
|
/*mpiCommunicator=*/Dune::MPIHelper::getCommunicator(),
|
||||||
|
#endif
|
||||||
|
/*upperRightCorner=*/upperRight,
|
||||||
|
/*numCells=*/cellRes, isPeriodic,
|
||||||
|
/*overlap=*/1));
|
||||||
#endif
|
#endif
|
||||||
/*upperRightCorner=*/upperRight,
|
|
||||||
/*numCells=*/cellRes, isPeriodic,
|
|
||||||
/*overlap=*/1));
|
|
||||||
gridPtr_->globalRefine(numRefinements);
|
gridPtr_->globalRefine(numRefinements);
|
||||||
|
|
||||||
this->finalizeInit_();
|
this->finalizeInit_();
|
||||||
|
|||||||
@@ -281,6 +281,9 @@ void testQuadrature()
|
|||||||
|
|
||||||
typedef Dune::YaspGrid<dim> Grid;
|
typedef Dune::YaspGrid<dim> Grid;
|
||||||
typedef Grid::LeafGridView GridView;
|
typedef Grid::LeafGridView GridView;
|
||||||
|
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
|
||||||
|
Grid grid(upperRight, cellRes);
|
||||||
|
#else
|
||||||
Grid grid(
|
Grid grid(
|
||||||
#ifdef HAVE_MPI
|
#ifdef HAVE_MPI
|
||||||
Dune::MPIHelper::getCommunicator(),
|
Dune::MPIHelper::getCommunicator(),
|
||||||
@@ -288,6 +291,7 @@ void testQuadrature()
|
|||||||
upperRight, // upper right
|
upperRight, // upper right
|
||||||
cellRes, // number of cells
|
cellRes, // number of cells
|
||||||
isPeriodic, 0); // overlap
|
isPeriodic, 0); // overlap
|
||||||
|
#endif
|
||||||
|
|
||||||
// compute approximate integral
|
// compute approximate integral
|
||||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
|
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
|
||||||
|
|||||||
Reference in New Issue
Block a user