Skip to content
Snippets Groups Projects
Commit 0920e1c4 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

added Fem namespace for dune-fem >= 1.4

parent c7b47dde
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ namespace boost {
namespace math {
//! isinf specialization for Dune::StraightenBlockVector
template <class BlockVectorImp, class DofImp>
#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 5)
#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 4)
inline bool isinf(const Dune::Fem::StraightenBlockVector<BlockVectorImp, DofImp>& x)
{
#else
......
......@@ -27,25 +27,45 @@ namespace Dune {
namespace Fem {
template <class DiscreteFunctionTraits>
auto begin(const Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func) -> decltype(func.dbegin())
#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 4)
auto begin(const Dune::Fem::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#else
auto begin(const Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#endif
-> decltype(func.dbegin())
{
return func.dbegin();
}
template <class DiscreteFunctionTraits>
auto end(const Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func) -> decltype(func.dend())
#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 4)
auto end(const Dune::Fem::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#else
auto end(const Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#endif
-> decltype(func.dend())
{
return func.dend();
}
template <class DiscreteFunctionTraits>
auto begin(Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func) -> decltype(func.dbegin())
#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 4)
auto begin(Dune::Fem::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#else
auto begin(Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#endif
-> decltype(func.dbegin())
{
return func.dbegin();
}
template <class DiscreteFunctionTraits>
auto end(Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func) -> decltype(func.dend())
#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 4)
auto end(Dune::Fem::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#else
auto end(Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func)
#endif
-> decltype(func.dend())
{
return func.dend();
}
......@@ -165,6 +185,18 @@ lagrangePointSetRange(const DiscreteFunctionspaceType& space, const EntityType&
return LagrangePointSetRange<DiscreteFunctionspaceType, codim>(space, entity, subEntity);
}
#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 4)
template <class GridPartTraits>
IntersectionRange<Dune::Fem::GridPartInterface<GridPartTraits>,
typename Dune::Fem::GridPartInterface<GridPartTraits>::template Codim<0>::EntityType>
intersectionRange(const Dune::Fem::GridPartInterface<GridPartTraits>& gridpart,
const typename Dune::Fem::GridPartInterface<GridPartTraits>::template Codim<0>::EntityType& entity)
{
return IntersectionRange<Dune::Fem::GridPartInterface<GridPartTraits>,
typename Dune::Fem::GridPartInterface<GridPartTraits>::template Codim<0>::EntityType>(
gridpart, entity);
}
#else
template <class GridPartTraits>
IntersectionRange<Dune::GridPartInterface<GridPartTraits>,
typename Dune::GridPartInterface<GridPartTraits>::template Codim<0>::EntityType>
......@@ -175,6 +207,7 @@ intersectionRange(const Dune::GridPartInterface<GridPartTraits>& gridpart,
typename Dune::GridPartInterface<GridPartTraits>::template Codim<0>::EntityType>(gridpart,
entity);
}
#endif
#endif // HAVE_DUNE_FEM
......
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