7#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_RESTRICTEDBASIS_HH
8#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_RESTRICTEDBASIS_HH
13#include <dune/common/typetree/traversal.hh>
42template<
class GV,
class SDPB,
class SD>
61 :
public SubDomainPreBasis::Node
63 using Base =
typename SubDomainPreBasis::Node;
70 , subDomainGridView_(subDomainGridView)
76 if (subDomainGridView_.contains(element))
80 Dune::TypeTree::forEachNode(
static_cast<Base&
>(*
this) , [&](
auto& node,
const auto& treePath) {
81 Dune::Functions::Impl::BasisNodeSetupHelper::setOffset(node, this->offset());
82 Dune::Functions::Impl::BasisNodeSetupHelper::setSize(node, 0);
154 template<
class SizePrefix>
188 template<
typename It>
191 if (node.size() == 0)
224template<
class SubDomainBasisFactory,
class SubDomain>
228 subPreBasisFactory=std::forward<SubDomainBasisFactory>(subPreBasisFactory),
230 ](
const auto& gridView) {
auto restrict(SubDomainBasisFactory &&subPreBasisFactory, const SubDomain &subDomain)
Create a RestrictedPreBasisFactory.
Definition restrictedbasis.hh:225
Definition subdomain.hh:28
Definition restrictedbasis.hh:205
Class representing a sub-domain of a GridView.
Definition subdomain.hh:534
GridView gridView() const
Create grid view representing the SubDomain.
Definition subdomain.hh:565
A pre-basis restricted to a sub-domain.
Definition restrictedbasis.hh:44
std::size_t size_type
Type used for indices and size information.
Definition restrictedbasis.hh:57
RestrictedPreBasis(const GridView &gridView, SubDomainPreBasis &&subDomainPreBasis, const SubDomain &subDomain)
Constructor for given sub-domain pre-basis.
Definition restrictedbasis.hh:107
void initializeIndices()
Initialize the global indices.
Definition restrictedbasis.hh:114
const SubDomainPreBasis & subDomainPreBasis() const
Definition restrictedbasis.hh:178
SDPB SubDomainPreBasis
Definition restrictedbasis.hh:50
static constexpr size_type minMultiIndexSize
Definition restrictedbasis.hh:98
size_type dimension() const
Get the total dimension of the space spanned by this basis.
Definition restrictedbasis.hh:167
SubDomainPreBasis subDomainPreBasis_
Definition restrictedbasis.hh:199
SubDomainPreBasis & subDomainPreBasis()
Definition restrictedbasis.hh:183
GV GridView
The grid view that the FE basis is defined on.
Definition restrictedbasis.hh:54
size_type maxNodeSize() const
Get the maximal number of DOFs associated to node for any element.
Definition restrictedbasis.hh:173
SD SubDomain
Definition restrictedbasis.hh:49
size_type size() const
Same as size(prefix) with empty prefix.
Definition restrictedbasis.hh:148
const SubDomain * subDomainPtr_
Definition restrictedbasis.hh:200
size_type size(const SizePrefix &prefix) const
Return number of possible values for next position in multi index.
Definition restrictedbasis.hh:155
typename SubDomainPreBasis::GridView SubDomainGridView
Definition restrictedbasis.hh:51
static constexpr size_type multiIndexBufferSize
Definition restrictedbasis.hh:99
GridView gridView_
Definition restrictedbasis.hh:198
const GridView & gridView() const
Obtain the grid view that the basis is defined on.
Definition restrictedbasis.hh:120
It indices(const Node &node, It it) const
Definition restrictedbasis.hh:189
auto containerDescriptor() const
Return the container descriptor of the pre-basis.
Definition restrictedbasis.hh:161
Node makeNode() const
Create tree node.
Definition restrictedbasis.hh:142
static constexpr size_type maxMultiIndexSize
Definition restrictedbasis.hh:97
void update(const GridView &gv)
Update the stored grid view, to be called.
Definition restrictedbasis.hh:133
Template mapping root tree path to type of created tree node.
Definition restrictedbasis.hh:62
typename Base::Element Element
Definition restrictedbasis.hh:66
void bind(const Element &element)
Definition restrictedbasis.hh:74
const SubDomain & subDomain() const
Definition restrictedbasis.hh:87
Node(Base &&base, const SubDomainGridView &subDomainGridView, const SubDomain &subDomain)
Definition restrictedbasis.hh:68