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

Add 'contains' methods just like the mappers in dune-grid have them.

[[Imported from SVN: r9955]]
parent 4f109e7f
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,15 @@ namespace Dune {
return localGlobalMap_.find(localIndex)->second;
}
template <class Entity>
bool contains(const Entity& entity, uint i, uint codim, Index& result) const
{
if (codim != GridView::dimension)
return false;
result = subIndex(entity,i,codim);
return true;
}
Index localIndex(const int& globalIndex) const {
return globalLocalMap_.find(globalIndex)->second;
}
......
......@@ -108,6 +108,16 @@ namespace Dune {
return localGlobalMap_.find(localIndex)->second;
}
template <class Entity>
bool contains(const Entity& entity, uint i, uint codim, Index& result) const
{
Index localIndex;
if (not p2Mapper_.contains(entity, i, codim,localIndex))
return false;
result = localGlobalMap_.find(localIndex)->second;
return true;
}
Index localIndex(const int& globalIndex) const {
return globalLocalMap_.find(globalIndex)->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