Skip to content
Snippets Groups Projects
Commit 873a5a38 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Merge branch 'make-compile-with-2.6' into 'master'

Make code compile with the 2.6 core modules

See merge request agnumpde/dune-fufem!52
parents 23bf63ad ea0f9b85
Branches
No related tags found
No related merge requests found
......@@ -35,10 +35,16 @@ void constructBoundaryDofs(const BoundaryPatch<GridView>& boundaryPatch,
boundaryDofs.unsetAll();
auto localView = basis.localView();
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
auto localIndexSet = basis.localIndexSet();
#endif
for (auto it = boundaryPatch.begin(); it != boundaryPatch.end(); ++it)
{
localView.bind(it->inside());
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
localIndexSet.bind(localView);
#endif
const auto& localCoefficients = localView.tree().finiteElement().localCoefficients();
for (size_t i=0; i<localCoefficients.size(); i++)
......@@ -51,7 +57,11 @@ void constructBoundaryDofs(const BoundaryPatch<GridView>& boundaryPatch,
unsigned int codim = localCoefficients.localKey(i).codim();
if (it.containsInsideSubentity(entity, codim))
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
boundaryDofs[localIndexSet.index(i)] = true;
#else
boundaryDofs[localView.index(i)] = true;
#endif
}
}
}
......
......@@ -2,9 +2,15 @@
#define GLOBAL_INTERSECTION_ITERATOR_HH
#include <dune/common/iteratorfacades.hh>
#include <dune/common/version.hh>
#include <dune/geometry/referenceelements.hh>
#if DUNE_VERSION_LT(DUNE_GEOMETRY,2,7)
#include <dune/fufem/referenceelementhelper.hh>
#endif
/** \brief Helper struct that statically either derefences the iterator, if it returns a reference,
* or otherwise return the 'member' intersection.
*/
......@@ -211,8 +217,12 @@ public:
bool containsInsideSubentity(int subEntity, int codim) const
{
#if DUNE_VERSION_LT(DUNE_GEOMETRY,2,7)
return ReferenceElementHelper<double, dim>::subEntityContainsSubEntity(eIt_->type(), (*nIt_)->indexInInside(), 1, subEntity, codim);
#else
auto re = Dune::referenceElement<double, dim>(eIt_->type());
return re.subEntities((*nIt_)->indexInInside(), 1,codim).contains(subEntity);
#endif
}
protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment