3#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_CONCEPTS_HH
4#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_CONCEPTS_HH
7#include <dune/common/concept.hh>
8#include <dune/common/reservedvector.hh>
19using namespace Dune::Concept;
44 template<
class C,
class I>
56 requireType<typename N::size_type>(),
57 requireConvertible<typename N::size_type>(node.size()),
58 requireConvertible<typename N::size_type>(node.localIndex(std::declval<typename N::size_type>())),
59 requireConvertible<typename N::size_type>(node.treeIndex()),
60 requireBaseOf<BasisNodeMixin, N>()
67template<
class Gr
idView>
72 requireType<typename N::Element>(),
73 requireType<typename N::FiniteElement>(),
74 requireConvertible<typename N::Element>(node.element()),
75 requireConvertible<const typename N::FiniteElement&>(node.finiteElement()),
76 requireSameType<typename N::Element, typename GridView::template Codim<0>::Entity>(),
77 requireBaseOf<Dune::Functions::LeafBasisNode, N>()
82template<
class Gr
idView>
86template<
class Gr
idView>
98template<
class Gr
idView>
103 requireBaseOf<ExpandTuple<Dune::Functions::template CompositeBasisNode, typename N::ChildTypes>, N>(),
110template<
class Gr
idView>
115 requireConcept<typename std::conditional< N::isLeaf, LeafBasisNode<GridView>,
BasisNode>::type, N>(),
117 requireConcept<typename std::conditional< N::isComposite, CompositeBasisNode<GridView>,
BasisNode>::type, N>()
123template<
class Gr
idView>
128 using MultiIndex = Dune::ReservedVector<typename PB::size_type, PB::multiIndexBufferSize>;
133 requireType<typename PB::GridView>(),
134 requireType<typename PB::size_type>(),
135 requireType<typename PB::Node>(),
136 requireConvertible<decltype(PB::maxMultiIndexSize), typename PB::size_type>(),
137 requireConvertible<decltype(PB::maxMultiIndexSize), typename PB::size_type>(),
138 requireConvertible<decltype(PB::multiIndexBufferSize), typename PB::size_type>(),
139 requireTrue<PB::minMultiIndexSize <= PB::maxMultiIndexSize>(),
140 requireTrue<PB::maxMultiIndexSize <= PB::multiIndexBufferSize>(),
141 requireSameType<typename PB::GridView, GridView>(),
142 const_cast<PB&
>(preBasis).initializeIndices(),
143 requireConvertible<typename PB::GridView>(preBasis.gridView()),
144 requireConvertible<typename PB::Node>(preBasis.makeNode()),
145 requireConvertible<typename PB::size_type>(preBasis.size()),
146 requireConvertible<typename PB::size_type>(preBasis.size(std::declval<MultiIndex<PB>>())),
147 requireConvertible<typename PB::size_type>(preBasis.dimension()),
148 requireConvertible<typename PB::size_type>(preBasis.maxNodeSize()),
149 requireSameType<decltype(const_cast<PB&>(preBasis).update(preBasis.gridView())),
void>(),
150 requireConcept<BasisTree<typename PB::GridView>>(preBasis.makeNode()),
151 requireConvertible<
typename std::vector<MultiIndex<PB>>::iterator>(
154 std::declval<typename std::vector<MultiIndex<PB>>::iterator>()))
161template<
class GlobalBasis>
166 requireType<typename V::size_type>(),
167 requireType<typename V::MultiIndex>(),
168 requireType<typename V::GlobalBasis>(),
169 requireType<typename V::Tree>(),
170 requireType<typename V::GridView>(),
171 requireType<typename V::Element>(),
172 requireSameType<typename V::GlobalBasis, GlobalBasis>(),
173 requireSameType<typename V::GridView, typename GlobalBasis::GridView>(),
174 requireSameType<typename V::size_type, typename GlobalBasis::size_type>(),
175 requireSameType<typename V::Element, typename GlobalBasis::GridView::template Codim<0>::Entity>(),
176 const_cast<V&
>(localView).bind(std::declval<typename V::Element>()),
177 const_cast<V&
>(localView).unbind(),
178 requireConvertible<bool>(localView.bound()),
179 requireConvertible<typename V::Tree>(localView.tree()),
180 requireConvertible<typename V::size_type>(localView.size()),
181 requireConvertible<typename V::MultiIndex>(localView.index(std::declval<typename V::size_type>())),
182 requireConvertible<typename V::size_type>(localView.maxSize()),
183 requireConvertible<typename V::GlobalBasis>(localView.globalBasis()),
184 requireConcept<BasisTree<typename V::GridView>>(localView.tree()),
192template<
class Gr
idView>
197 requireType<typename B::GridView>(),
198 requireType<typename B::size_type>(),
199 requireType<typename B::MultiIndex>(),
200 requireType<typename B::SizePrefix>(),
201 requireType<typename B::LocalView>(),
202 requireSameType<typename B::GridView, GridView>(),
203 requireConvertible<typename B::GridView>(basis.gridView()),
204 requireConvertible<typename B::LocalView>(basis.localView()),
205 requireConvertible<typename B::size_type>(basis.size()),
206 requireConvertible<typename B::size_type>(basis.size(std::declval<typename B::SizePrefix>())),
207 requireConvertible<typename B::size_type>(basis.dimension()),
208 requireSameType<decltype(const_cast<B&>(basis).update(basis.gridView())),
void>(),
209 requireConcept<LocalView<B>>(basis.localView())
Definition: polynomial.hh:10
Definition: functionspacebases/concepts.hh:23
auto require(C &&c) -> decltype(c.resize(0))
Definition: functionspacebases/concepts.hh:33
auto require(C &&c) -> decltype(c.size())
Definition: functionspacebases/concepts.hh:43
auto require(C &&c, I &&i) -> decltype(c[i])
Definition: functionspacebases/concepts.hh:53
auto require(const N &node) -> decltype(requireType< typename N::size_type >(), requireConvertible< typename N::size_type >(node.size()), requireConvertible< typename N::size_type >(node.localIndex(std::declval< typename N::size_type >())), requireConvertible< typename N::size_type >(node.treeIndex()), requireBaseOf< BasisNodeMixin, N >())
Definition: functionspacebases/concepts.hh:69
auto require(const N &node) -> decltype(requireType< typename N::Element >(), requireType< typename N::FiniteElement >(), requireConvertible< typename N::Element >(node.element()), requireConvertible< const typename N::FiniteElement & >(node.finiteElement()), requireSameType< typename N::Element, typename GridView::template Codim< 0 >::Entity >(), requireBaseOf< Dune::Functions::LeafBasisNode, N >())
Definition: functionspacebases/concepts.hh:112
auto require(const N &node) -> decltype(requireConcept< typename std::conditional< N::isLeaf, LeafBasisNode< GridView >, BasisNode >::type, N >(), requireConcept< typename std::conditional< N::isPower, PowerBasisNode< GridView >, BasisNode >::type, N >(), requireConcept< typename std::conditional< N::isComposite, CompositeBasisNode< GridView >, BasisNode >::type, N >())
Definition: functionspacebases/concepts.hh:88
auto require(const N &node) -> decltype(requireBaseOf< Dune::Functions::PowerBasisNode< typename N::ChildType, N::degree()>, N >(), requireConcept< BasisTree< GridView >, typename N::ChildType >())
Definition: functionspacebases/concepts.hh:100
auto require(const N &node) -> decltype(requireBaseOf< ExpandTuple< Dune::Functions::template CompositeBasisNode, typename N::ChildTypes >, N >(), requireConceptForTupleEntries< BasisTree< GridView >, typename N::ChildTypes >())
Definition: functionspacebases/concepts.hh:125
auto require(const PB &preBasis) -> decltype(requireType< typename PB::GridView >(), requireType< typename PB::size_type >(), requireType< typename PB::Node >(), requireConvertible< decltype(PB::maxMultiIndexSize), typename PB::size_type >(), requireConvertible< decltype(PB::maxMultiIndexSize), typename PB::size_type >(), requireConvertible< decltype(PB::multiIndexBufferSize), typename PB::size_type >(), requireTrue< PB::minMultiIndexSize<=PB::maxMultiIndexSize >(), requireTrue< PB::maxMultiIndexSize<=PB::multiIndexBufferSize >(), requireSameType< typename PB::GridView, GridView >(), const_cast< PB & >(preBasis).initializeIndices(), requireConvertible< typename PB::GridView >(preBasis.gridView()), requireConvertible< typename PB::Node >(preBasis.makeNode()), requireConvertible< typename PB::size_type >(preBasis.size()), requireConvertible< typename PB::size_type >(preBasis.size(std::declval< MultiIndex< PB > >())), requireConvertible< typename PB::size_type >(preBasis.dimension()), requireConvertible< typename PB::size_type >(preBasis.maxNodeSize()), requireSameType< decltype(const_cast< PB & >(preBasis).update(preBasis.gridView())), void >(), requireConcept< BasisTree< typename PB::GridView > >(preBasis.makeNode()), requireConvertible< typename std::vector< MultiIndex< PB > >::iterator >(preBasis.indices(preBasis.makeNode(), std::declval< typename std::vector< MultiIndex< PB > >::iterator >())))
Definition: functionspacebases/concepts.hh:163
auto require(const V &localView) -> decltype(requireType< typename V::size_type >(), requireType< typename V::MultiIndex >(), requireType< typename V::GlobalBasis >(), requireType< typename V::Tree >(), requireType< typename V::GridView >(), requireType< typename V::Element >(), requireSameType< typename V::GlobalBasis, GlobalBasis >(), requireSameType< typename V::GridView, typename GlobalBasis::GridView >(), requireSameType< typename V::size_type, typename GlobalBasis::size_type >(), requireSameType< typename V::Element, typename GlobalBasis::GridView::template Codim< 0 >::Entity >(), const_cast< V & >(localView).bind(std::declval< typename V::Element >()), const_cast< V & >(localView).unbind(), requireConvertible< bool >(localView.bound()), requireConvertible< typename V::Tree >(localView.tree()), requireConvertible< typename V::size_type >(localView.size()), requireConvertible< typename V::MultiIndex >(localView.index(std::declval< typename V::size_type >())), requireConvertible< typename V::size_type >(localView.maxSize()), requireConvertible< typename V::GlobalBasis >(localView.globalBasis()), requireConcept< BasisTree< typename V::GridView > >(localView.tree()), 0)
Definition: functionspacebases/concepts.hh:194
auto require(const B &basis) -> decltype(requireType< typename B::GridView >(), requireType< typename B::size_type >(), requireType< typename B::MultiIndex >(), requireType< typename B::SizePrefix >(), requireType< typename B::LocalView >(), requireSameType< typename B::GridView, GridView >(), requireConvertible< typename B::GridView >(basis.gridView()), requireConvertible< typename B::LocalView >(basis.localView()), requireConvertible< typename B::size_type >(basis.size()), requireConvertible< typename B::size_type >(basis.size(std::declval< typename B::SizePrefix >())), requireConvertible< typename B::size_type >(basis.dimension()), requireSameType< decltype(const_cast< B & >(basis).update(basis.gridView())), void >(), requireConcept< LocalView< B > >(basis.localView()))