Skip to content
Snippets Groups Projects
Commit 5917425d authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

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]]
parent 94e5084a
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment