diff --git a/dune/fufem/assemblers/boundaryfunctionalassembler.hh b/dune/fufem/assemblers/boundaryfunctionalassembler.hh index 761ab13b0df6220639449207376f18b3f0da1fe2..fe77a307bd4ab2a64e1caed8bdad83c4a866622d 100644 --- a/dune/fufem/assemblers/boundaryfunctionalassembler.hh +++ b/dune/fufem/assemblers/boundaryfunctionalassembler.hh @@ -82,12 +82,8 @@ class BoundaryFunctionalAssembler for (; it != end; ++it) { -#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) const auto inside = it->inside(); -#else - const auto insidePtr = it->inside(); - const auto& inside = *insidePtr; -#endif + // get shape functions const typename TrialBasis::LocalFiniteElement& tFE = tBasis_.getLocalFiniteElement(inside); diff --git a/dune/fufem/assemblers/boundaryoperatorassembler.hh b/dune/fufem/assemblers/boundaryoperatorassembler.hh index 289ea683c6188cd298f7581016c310a22292c9ae..3a2d3125e4b7e77837ad7adc31dfe87c9f89c4a8 100644 --- a/dune/fufem/assemblers/boundaryoperatorassembler.hh +++ b/dune/fufem/assemblers/boundaryoperatorassembler.hh @@ -77,12 +77,8 @@ class BoundaryOperatorAssembler BoundaryIterator end = boundaryPatch_.end(); for (; it != end; ++it) { -#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) const auto inside = it->inside(); -#else - const auto insidePtr = it->inside(); - const auto& inside = *insidePtr; -#endif + // get shape functions const typename TrialBasis::LocalFiniteElement& tFE = tBasis_.getLocalFiniteElement(inside); const typename AnsatzBasis::LocalFiniteElement& aFE = aBasis_.getLocalFiniteElement(inside); @@ -153,12 +149,8 @@ class BoundaryOperatorAssembler BoundaryIterator end = boundaryPatch_.end(); for (; it != end; ++it) { -#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) const auto inside = it->inside(); -#else - const auto insidePtr = it->inside(); - const auto& inside = *insidePtr; -#endif + // get shape functions const typename TrialBasis::LocalFiniteElement& tFE = tBasis_.getLocalFiniteElement(inside); const typename AnsatzBasis::LocalFiniteElement& aFE = aBasis_.getLocalFiniteElement(inside); diff --git a/dune/fufem/assemblers/localassemblers/generalizedboundarymassassembler.hh b/dune/fufem/assemblers/localassemblers/generalizedboundarymassassembler.hh index 40b25c3a41dc374bab425dbf0cbcad45934c6a63..32fea55fc81ed4c393592492f280c94abd3f8d05 100644 --- a/dune/fufem/assemblers/localassemblers/generalizedboundarymassassembler.hh +++ b/dune/fufem/assemblers/localassemblers/generalizedboundarymassassembler.hh @@ -78,12 +78,7 @@ class GeneralizedBoundaryMassAssembler // loop over quadrature points for (size_t pt=0; pt < quad.size(); ++pt) { -#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) const auto inside = it->inside(); -#else - const auto insidePtr = it->inside(); - const auto& inside = *insidePtr; -#endif // get quadrature point const Dune::FieldVector<ctype,dim-1>& quadPos = quad[pt].position(); diff --git a/dune/fufem/assemblers/localassemblers/neumannboundaryassembler.hh b/dune/fufem/assemblers/localassemblers/neumannboundaryassembler.hh index 17811b105ee607bc0aa8e0d0ce5a3f15e8984b73..b8fe0e4405fdd9b9d58b706ecd3751b7c31cb94b 100644 --- a/dune/fufem/assemblers/localassemblers/neumannboundaryassembler.hh +++ b/dune/fufem/assemblers/localassemblers/neumannboundaryassembler.hh @@ -80,12 +80,7 @@ class NeumannBoundaryAssembler : // loop over quadrature points for (size_t pt=0; pt < quad.size(); ++pt) { -#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) const auto inside = it->inside(); -#else - const auto insidePtr = it->inside(); - const auto& inside = *insidePtr; -#endif // get quadrature point const Dune::FieldVector<ctype,dim-1>& quadPos = quad[pt].position(); diff --git a/dune/fufem/assemblers/localassemblers/normalstressboundaryassembler.hh b/dune/fufem/assemblers/localassemblers/normalstressboundaryassembler.hh index be513e00864b9b9cc923a5ac9d427dd07943a4fc..a2f527912a0698bb31d427ed9f2bd198f4559e50 100644 --- a/dune/fufem/assemblers/localassemblers/normalstressboundaryassembler.hh +++ b/dune/fufem/assemblers/localassemblers/normalstressboundaryassembler.hh @@ -39,12 +39,7 @@ public: /** \brief Assemble the normal stress at a boundary face.*/ template <class TrialLocalFE, class BoundaryIterator> void assemble(const BoundaryIterator& it, LocalVector& localVector, const TrialLocalFE& tFE) { -#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) - const auto inside = it->inside(); -#else - const auto insidePtr = it->inside(); - const auto& inside = *insidePtr; -#endif + const auto inside = it->inside(); localVector = 0.0; diff --git a/dune/fufem/facehierarchy.hh b/dune/fufem/facehierarchy.hh index b6b9ef9310cdbfe1155212a5371359d6439d41e4..4dc38cf72e6613e79acc3ff7d863d1c1b29a95fa 100644 --- a/dune/fufem/facehierarchy.hh +++ b/dune/fufem/facehierarchy.hh @@ -215,11 +215,7 @@ class Face StorableFace father() const { StorableFace fatherFace(*grid_, *element().father()); -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) for(int i=0; i < fatherFace.element().subEntities(1); ++i) -#else - for(int i=0; i < fatherFace.element().template count<1>(); ++i) -#endif { if (isSubFace(fatherFace.element(), i, element(), index_)) { diff --git a/dune/fufem/functionspacebases/p0basis.hh b/dune/fufem/functionspacebases/p0basis.hh index 64b4aa82302f532e82e4eeae82e89848b9bcabb5..6ed427fbb148eed0884515d613b1a194d38a51e2 100644 --- a/dune/fufem/functionspacebases/p0basis.hh +++ b/dune/fufem/functionspacebases/p0basis.hh @@ -75,11 +75,7 @@ class P0Basis : int index(const Element& e, const int i) const { -#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) return mapper_.index(e); -#else - return mapper_.map(e); -#endif } protected: diff --git a/dune/fufem/functionspacebases/p2nodalbasis.hh b/dune/fufem/functionspacebases/p2nodalbasis.hh index 883ba9b65bccafa0fab87250656143f8320e37b4..e015375903647056cdd3fa6ba8429cafe0a246d7 100644 --- a/dune/fufem/functionspacebases/p2nodalbasis.hh +++ b/dune/fufem/functionspacebases/p2nodalbasis.hh @@ -51,17 +51,9 @@ class P2BasisMapper : Base(gridView) {} -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) typename Base::Index index(const Element& e, const Dune::LocalKey& localKey) const -#else - int index(const Element& e, const Dune::LocalKey& localKey) const -#endif { -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) return this->subIndex(e, localKey.subEntity(), localKey.codim()); -#else - return this->map(e, localKey.subEntity(), localKey.codim()); -#endif } }; diff --git a/dune/fufem/globalintersectioniterator.hh b/dune/fufem/globalintersectioniterator.hh index bf8a5807b5ff69bf7513dd5bdd25b0a058be4552..242f946a627df94631e5feea201118cb18e85087 100644 --- a/dune/fufem/globalintersectioniterator.hh +++ b/dune/fufem/globalintersectioniterator.hh @@ -8,7 +8,6 @@ #include <dune/fufem/referenceelementhelper.hh> -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) /** \brief Helper struct that statically either derefences the iterator, if it returns a reference, * or otherwise return the 'member' intersection. */ @@ -45,7 +44,6 @@ static const typename IntersectionIterator::Intersection& returnReference(Inters { return ReturnReferenceHelper<IntersectionIterator,returnsReference>::returnReference(nIt,intersection); } -#endif /** \brief Base class for iterators on intersections of a grid view @@ -77,11 +75,9 @@ public: typedef typename IntersectionIterator::Intersection Intersection; private: -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) // If this value is true, then the implementation still returns the Intersection by const reference // thus in this case we don't need to store the intersections at all static const bool isReference = std::is_lvalue_reference<decltype(std::declval<IntersectionIterator>().operator*())>::value; -#endif public: @@ -149,9 +145,7 @@ public: if (other.nIt_) nIt_ = new IntersectionIterator(*other.nIt_); -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) updateIntersection(other.intersection_); -#endif } ~GlobalIntersectionIterator() { @@ -183,9 +177,7 @@ public: // check if we skip the intersection const Intersection& intersection = **nIt_; if (not asImpl().skipIntersection(intersection)) { -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) updateIntersection(intersection); -#endif break; } @@ -199,11 +191,7 @@ public: const Intersection& dereference() const { -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) return returnReference<IntersectionIterator,isReference>(nIt_,intersection_); -#else - return **nIt_; -#endif } const GlobalIntersectionIterator& operator=(const GlobalIntersectionIterator& other) @@ -219,9 +207,7 @@ public: else nIt_ = 0; -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) updateIntersection(other.intersection_); -#endif return *this; } @@ -233,14 +219,12 @@ public: protected: -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) //! Update the stored intersection if we have to void updateIntersection(const Intersection& intersection) { if (not isReference) intersection_ = std::move(intersection); } -#endif /** \brief Find first valid intersection * @@ -257,10 +241,8 @@ protected: const Intersection& intersection = **nIt_; if (asImpl().skipIntersection(intersection)) increment(); -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) else updateIntersection(intersection); -#endif } const Impl& asImpl() const @@ -280,12 +262,10 @@ protected: IntersectionIterator* nIt_; -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) /** \brief The intersection corresponding to the actual global intersection iterator. * It is only set if dereferencing the intersection iterator is returning a temporary. */ Intersection intersection_; -#endif };