...
 
Commits (2)
......@@ -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:
......