diff --git a/dune/fufem/functiontools/boundarydofs.hh b/dune/fufem/functiontools/boundarydofs.hh index b156363c897194fc5a7ac51be4065aa34f9773b0..a21a5822e2671927fd03fd74d33bcf3a0a8ddf52 100644 --- a/dune/fufem/functiontools/boundarydofs.hh +++ b/dune/fufem/functiontools/boundarydofs.hh @@ -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 } } } diff --git a/dune/fufem/globalintersectioniterator.hh b/dune/fufem/globalintersectioniterator.hh index 408c073bd0b21a539787949fd193ea9680e5f2da..64afa1d2b844895eef76869a6fb8b281ed9d2060 100644 --- a/dune/fufem/globalintersectioniterator.hh +++ b/dune/fufem/globalintersectioniterator.hh @@ -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: