The restriction of a finite element basis to a single element. More...
#include <LocalView.hpp>
Public Types | |
using | GlobalBasis = GB |
The global FE basis that this is a view on. | |
using | GridView = typename GlobalBasis::GridView |
The grid view the global FE basis lives on. | |
using | Element = typename GridView::template Codim< 0 >::Entity |
Type of the grid element we are bound to. | |
using | size_type = std::size_t |
The type used for sizes. | |
using | Tree = Node_t< typename GlobalBasis::PreBasis, PrefixPath > |
Tree of local finite elements / local shape function sets. | |
using | TreeCache = NodeCache_t< Tree > |
Cached basis-tree. | |
using | MultiIndex = typename NodeIndexSet::MultiIndex |
Type used for global numbering of the basis vectors. | |
Public Member Functions | |
LocalView (GlobalBasis const &globalBasis) | |
Construct local view for a given global finite element basis. | |
LocalView (LocalView const &other) | |
Copy constructor. | |
LocalView (LocalView &&other) | |
void | bind (Element const &element) |
Bind the view to a grid element. More... | |
bool | isBound () const |
Return if the view is bound to a grid element. | |
Element const & | element () const |
Return the grid element that the view is bound to. | |
void | unbind () |
Unbind from the current element. More... | |
Tree const & | tree () const |
Return the local ansatz tree associated to the bound entity. | |
TreeCache const & | treeCache () const |
Cached version of the local ansatz tree. | |
size_type | size () const |
Total number of degrees of freedom on this element. | |
size_type | maxSize () const |
Maximum local size for any element on the GridView. More... | |
MultiIndex | index (size_type i) const |
Maps from subtree index set [0..size-1] to a globally unique multi index in global basis. | |
GlobalBasis const & | globalBasis () const |
Return the global basis that we are a view on. | |
LocalView const & | rootLocalView () const |
Return this local-view. | |
Protected Attributes | |
GlobalBasis const * | globalBasis_ |
Tree | tree_ |
TreeCache | treeCache_ |
NodeIndexSet | nodeIndexSet_ |
std::optional< Element > | element_ |
std::vector< MultiIndex > | indices_ |
The restriction of a finite element basis to a single element.
|
inline |
Bind the view to a grid element.
Having to bind the view to an element before being able to actually access any of its data members offers to centralize some expensive setup code in the bind
method, which can save a lot of run-time.
References LocalView< GB >::element(), and LocalView< GB >::size().
|
inline |
Maximum local size for any element on the GridView.
This is the maximal size needed for local matrices and local vectors.
|
inline |
Unbind from the current element.
Calling this method should only be a hint that the view can be unbound.