Commit 03c9b78c authored by Carsten Gräser's avatar Carsten Gräser

Merge branch 'feature/make-2.6-compatible' into 'releases/2.6'

Patch releases/2.6 branch to work with 2.6 releases

See merge request !178
parents 5afbd874 3f5837f9
Pipeline #10185 passed with stage
in 11 minutes and 5 seconds
---
variables:
DUNECI_BRANCH: releases/2.6
before_script:
- duneci-install-module https://gitlab.dune-project.org/core/dune-common.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-geometry.git
......
......@@ -3,8 +3,6 @@
Any version of dune-functions is supposed to be compatible with the
correponding version of the Dune core modules.
## Master (will become release 2.7)
## Release 2.6
- When using `DiscreteGlobalBasisFunction` and `interpolate` the
......
# Dune module information file
Module: dune-functions
Version: 2.7-git
Version: 2.6-git
Maintainer: dune-functions@lists.dune-project.org
Depends: dune-geometry (>= 2.7) dune-localfunctions (>= 2.7) dune-grid (>= 2.7) dune-istl (>= 2.7) dune-typetree
Depends: dune-geometry (>= 2.6) dune-localfunctions (>= 2.6) dune-grid (>= 2.6) dune-istl (>= 2.6) dune-typetree
Whitespace-Hook: Yes
......@@ -254,6 +254,28 @@ struct RotateTuple
namespace Imp {
/*
* \brief Apply function with arguments from a given tuple
*
* \param f A callable object
* \param args Tuple containing the arguments
* \param indices Indices to arguments in tuple as std::integer_sequence
*
* This will call the function with arguments generated by unpacking those
* entries of the tuple that show up given integer_sequence.
*
* \ingroup Utility
*/
template<class F, class ArgTuple, class I, I... i>
decltype(auto) applyPartial(F&& f, ArgTuple&& args, std::integer_sequence<I, i...> indices)
{
return f(std::get<i>(args)...);
}
}
/**
* \brief Create a predicate for checking validity of expressions
*
......
......@@ -12,7 +12,6 @@
#include <dune/common/reservedvector.hh>
#include <dune/common/typeutilities.hh>
#include <dune/common/hybridutilities.hh>
#include <dune/common/tupleutility.hh>
#include <dune/typetree/compositenode.hh>
#include <dune/typetree/utility.hh>
......@@ -520,7 +519,7 @@ auto composite(Args&&... args)
auto childIndices = std::make_index_sequence<children>{};
// Unpack tuple only for those entries related to children
return applyPartial([](auto&&... childPreBasisFactory){
return Dune::Functions::Imp::applyPartial([](auto&&... childPreBasisFactory){
return Imp::CompositePreBasisFactory<IndexMergingStrategy, std::decay_t<decltype(childPreBasisFactory)>...>(std::forward<decltype(childPreBasisFactory)>(childPreBasisFactory)...);
},
std::forward_as_tuple(std::forward<Args>(args)...),
......
......@@ -8,6 +8,7 @@
#include <type_traits>
#include <dune/common/concept.hh>
#include <dune/common/tuplevector.hh>
#include <dune/functions/functionspacebases/concepts.hh>
#include <dune/functions/common/indexaccess.hh>
......@@ -28,11 +29,23 @@ namespace Functions {
*/
struct HierarchicNodeToRangeMap
{
template<std::size_t... i>
static constexpr auto makeHybrid(TypeTree::TreePath<i...>)
{
return Dune::TupleVector<Dune::index_constant<i>...>();
}
template<class... I>
static constexpr auto makeHybrid(const TypeTree::HybridTreePath<I...>& treePath)
{
return treePath;
}
template<class Node, class TreePath, class Range,
std::enable_if_t< models<Concept::HasIndexAccess, Range, Dune::index_constant<0>>(), int> = 0>
decltype(auto) operator()(const Node& node, const TreePath& treePath, Range&& y) const
{
return resolveStaticMultiIndex(y, treePath);
return resolveStaticMultiIndex(y, makeHybrid(treePath));
}
template<class Node, class TreePath, class Range,
......
......@@ -61,7 +61,7 @@ struct AllTrueBitSetVector
template <class B, class T, class NTRE, class HV, class LF, class HBV>
class LocalInterpolateVisitor
: public TypeTree::TreeVisitor
, public TypeTree::DynamicTraversal
, public TypeTree::StaticTraversal
{
public:
......
......@@ -123,7 +123,7 @@ void testScalarBasisConst(const Basis& feBasis,
typedef typename Basis::MultiIndex MultiIndex;
// And this type must be indexable
static_assert(IsIndexable<MultiIndex>(), "MultiIndex must support operator[]");
static_assert(is_indexable<MultiIndex>(), "MultiIndex must support operator[]");
///////////////////////////////////////////////////////////////////////////////////
// Check whether the global indices are in the correct range,
......
......@@ -105,7 +105,7 @@ public:
struct LocalEvaluateVisitor
: public TypeTree::TreeVisitor
, public TypeTree::DynamicTraversal
, public TypeTree::StaticTraversal
{
LocalEvaluateVisitor(const LocalDomain& x, Range& y, const LocalView& localView, const Vector& coefficients, const NodeToRangeEntry& nodeToRangeEntry, ShapeFunctionValueContainer& shapeFunctionValueContainer):
x_(x),
......
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