Go to the documentation of this file.
3 #ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTLOCALVIEW_HH
4 #define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTLOCALVIEW_HH
9 #include <dune/common/concept.hh>
10 #include <dune/common/std/optional.hh>
11 #include <dune/common/hybridutilities.hh>
27 using NodeIndexSet =
typename GB::PreBasis::IndexSet;
35 using GridView =
typename GlobalBasis::GridView;
38 using Element =
typename GridView::template Codim<0>::Entity;
44 using Tree =
typename GlobalBasis::PreBasis::Node;
51 template<
typename NodeIndexSet_>
52 using hasIndices = decltype(std::declval<NodeIndexSet_>().indices(std::declval<std::vector<typename NodeIndexSet_::MultiIndex>>().begin()));
78 Std::is_detected<hasIndices,NodeIndexSet>{},
173 #endif // DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTLOCALVIEW_HH
std::vector< MultiIndex > indices_
Definition: defaultlocalview.hh:163
const DefaultLocalView & rootLocalView() const
Definition: defaultlocalview.hh:153
typename GlobalBasis::PreBasis::Node Tree
Tree of local finite elements / local shape function sets.
Definition: defaultlocalview.hh:44
Tree tree_
Definition: defaultlocalview.hh:161
The restriction of a finite element basis to a single element.
Definition: defaultlocalview.hh:24
const Tree & tree() const
Return the local ansatz tree associated to the bound entity.
Definition: defaultlocalview.hh:117
DefaultLocalView(const GlobalBasis &globalBasis)
Construct local view for a given global finite element basis.
Definition: defaultlocalview.hh:57
GB GlobalBasis
The global FE basis that this is a view on.
Definition: defaultlocalview.hh:32
Definition: functionspacebases/concepts.hh:82
const GlobalBasis & globalBasis() const
Return the global basis that we are a view on.
Definition: defaultlocalview.hh:148
void bindTree(Tree &tree, const Entity &entity, std::size_t offset=0)
Definition: nodes.hh:249
typename GlobalBasis::GridView GridView
The grid view the global FE basis lives on.
Definition: defaultlocalview.hh:35
Std::optional< Element > element_
Definition: defaultlocalview.hh:160
const GlobalBasis * globalBasis_
Definition: defaultlocalview.hh:159
size_type maxSize() const
Maximum local size for any element on the GridView.
Definition: defaultlocalview.hh:135
const Element & element() const
Return the grid element that the view is bound to.
Definition: defaultlocalview.hh:98
NodeIndexSet nodeIndexSet_
Definition: defaultlocalview.hh:162
typename NodeIndexSet::MultiIndex MultiIndex
Type used for global numbering of the basis vectors.
Definition: defaultlocalview.hh:47
MultiIndex index(size_type i) const
Maps from subtree index set [0..size-1] to a globally unique multi index in global basis.
Definition: defaultlocalview.hh:141
bool isBound() const
Return if the view is bound to a grid element.
Definition: defaultlocalview.hh:90
Definition: polynomial.hh:10
void bind(const Element &e)
Bind the view to a grid element.
Definition: defaultlocalview.hh:71
size_type size() const
Total number of degrees of freedom on this element.
Definition: defaultlocalview.hh:124
void unbind()
Unbind from the current element.
Definition: defaultlocalview.hh:107
void initializeTree(Tree &tree, std::size_t treeIndexOffset=0)
Definition: nodes.hh:256
std::size_t size_type
The type used for sizes.
Definition: defaultlocalview.hh:41
typename GridView::template Codim< 0 >::Entity Element
Type of the grid element we are bound to.
Definition: defaultlocalview.hh:38