Commit 06532a32 authored by Felix Gruber's avatar Felix Gruber

make our function space bases work with dune-functions 2.7

dune-functions recently removed the deprecated DefaultLocalIndexSet, so
we have to make sure that it is not referred to when using
dune-functions >= 2.7.
parent 87a0824d
Pipeline #15291 passed with stage
in 10 minutes and 16 seconds
......@@ -7,14 +7,17 @@
#include <type_traits>
#include <utility>
#include <dune/common/reservedvector.hh>
#include <dune/common/typeutilities.hh>
#include <dune/common/concept.hh>
#include <dune/common/deprecated.hh>
#include <dune/common/reservedvector.hh>
#include <dune/common/typeutilities.hh>
#include <dune/common/version.hh>
#include <dune/dpg/functions/concepts.hh>
#include <dune/functions/common/type_traits.hh>
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
#include <dune/functions/functionspacebases/constrainedlocalindexset.hh>
#endif
#include <dune/functions/functionspacebases/constrainedlocalview.hh>
#include <dune/functions/functionspacebases/flatmultiindex.hh>
......@@ -72,8 +75,10 @@ public:
//! Type used for prefixes handed to the size() method
using SizePrefix = typename PreBasis::SizePrefix;
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
//! Type of local index set exported by localIndexSet()
using LocalIndexSet = ConstrainedLocalIndexSet<LocalView, NodeIndexSet>;
#endif
/**
......@@ -143,6 +148,7 @@ public:
return LocalView(*this);
}
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
//! Return local index set for basis
LocalIndexSet
DUNE_DEPRECATED_MSG("localIndexSet() is deprecated. The indexing method are now available in the ConstrainedLocalView. Indices are computed when binding the ConstrainedLocalView.")
......@@ -150,6 +156,7 @@ public:
{
return LocalIndexSet(preBasis_.template indexSet<PrefixPath>());
}
#endif
//! Return *this because we are not embedded in a larger basis
const ConstrainedGlobalBasis& rootBasis() const
......
......@@ -3,12 +3,15 @@
#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_REFINEDGLOBALBASIS_HH
#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_REFINEDGLOBALBASIS_HH
#include <dune/common/concept.hh>
#include <dune/common/reservedvector.hh>
#include <dune/common/typeutilities.hh>
#include <dune/common/concept.hh>
#include <dune/common/version.hh>
#include <dune/functions/common/type_traits.hh>
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
#include <dune/functions/functionspacebases/defaultlocalindexset.hh>
#endif
#include <dune/functions/functionspacebases/refinedlocalview.hh>
#include <dune/functions/functionspacebases/concepts.hh>
......@@ -67,8 +70,10 @@ public:
//! Type used for prefixes handed to the size() method
using SizePrefix = typename PreBasis::SizePrefix;
//! Type of local indixes set exported by localIndexSet()
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
//! Type of local index set exported by localIndexSet()
using LocalIndexSet = DefaultLocalIndexSet<LocalView, NodeIndexSet>;
#endif
/**
......@@ -138,11 +143,13 @@ public:
return LocalView(*this);
}
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
//! Return local index set for basis
LocalIndexSet localIndexSet() const
{
return LocalIndexSet(preBasis_.template indexSet<PrefixPath>());
}
#endif
//! Return *this because we are not embedded in a larger basis
const RefinedGlobalBasis& rootBasis() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment