From 5917425d5f5329708f3c41680ac3289f77ad03fc Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Wed, 14 Jan 2015 11:09:25 +0000 Subject: [PATCH] Replace deprecated method Mapper::map by Mapper::subIndex, when dune-grid is at least 2.4 This removes a compiler deprecation warning. By using the usual preprocessor magic we retain compatibility with the dune 2.3 release. [[Imported from SVN: r9993]] --- dune/gfe/parallel/globalp1mapper.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dune/gfe/parallel/globalp1mapper.hh b/dune/gfe/parallel/globalp1mapper.hh index ae8dc653..12443dbe 100644 --- a/dune/gfe/parallel/globalp1mapper.hh +++ b/dune/gfe/parallel/globalp1mapper.hh @@ -53,7 +53,11 @@ namespace Dune { for (size_t i=0; i<it->template count<dim>(); i++) #endif { +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + int localIndex = p1Mapper_.subIndex(*it, i, dim); +#else int localIndex = p1Mapper_.map(*it, i, dim); +#endif int globalIndex = globalVertexIndexSet.subIndex(*it, i, dim); localGlobalMap_[localIndex] = globalIndex; @@ -71,7 +75,11 @@ namespace Dune { template <class Entity> Index subIndex(const Entity& entity, uint i, uint codim) const { +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + int localIndex = p1Mapper_.subIndex(entity, i, codim); +#else int localIndex = p1Mapper_.map(entity, i, codim); +#endif return localGlobalMap_.find(localIndex)->second; } -- GitLab