fix the dune 2.4 deprecation warnings

mainly this boils down to mapper.map(e) -> mapper.index(e)
This commit is contained in:
Andreas Lauser
2014-12-12 13:54:32 +01:00
parent a8d5c72248
commit a74a4d2f6e
2 changed files with 14 additions and 7 deletions

View File

@@ -125,10 +125,9 @@ public:
Dune::FieldVector<int, dim> cellRes;
#endif
Dune::FieldVector<Scalar, dim> upperRight;
Dune::FieldVector<Scalar, dim> lowerLeft;
typedef double GridScalar;
Dune::FieldVector<GridScalar, dim> upperRight;
lowerLeft[1] = 0.0;
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
@@ -140,13 +139,17 @@ public:
}
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>(
#ifdef HAVE_MPI
/*mpiCommunicator=*/Dune::MPIHelper::getCommunicator(),
/*mpiCommunicator=*/Dune::MPIHelper::getCommunicator(),
#endif
/*upperRightCorner=*/upperRight,
/*numCells=*/cellRes, isPeriodic,
/*overlap=*/1));
#endif
/*upperRightCorner=*/upperRight,
/*numCells=*/cellRes, isPeriodic,
/*overlap=*/1));
gridPtr_->globalRefine(numRefinements);
this->finalizeInit_();

View File

@@ -281,6 +281,9 @@ void testQuadrature()
typedef Dune::YaspGrid<dim> Grid;
typedef Grid::LeafGridView GridView;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
Grid grid(upperRight, cellRes);
#else
Grid grid(
#ifdef HAVE_MPI
Dune::MPIHelper::getCommunicator(),
@@ -288,6 +291,7 @@ void testQuadrature()
upperRight, // upper right
cellRes, // number of cells
isPeriodic, 0); // overlap
#endif
// compute approximate integral
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)