Loading...
Searching...
No Matches
Dune::Functions::DefaultLocalView< GB > Class Template Reference

The restriction of a finite element basis to a single element. More...

`#include <dune/functions/functionspacebases/defaultlocalview.hh>`

Inheritance diagram for Dune::Functions::DefaultLocalView< GB >:

## 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 = typename GlobalBasis::PreBasis::Node
| Tree of local finite elements / local shape function sets.
using | MultiIndex
| Type used for global numbering of the basis vectors.

## Public Member Functions

| DefaultLocalView (const GlobalBasis &globalBasis)
| Construct local view for a given global finite element basis.
| DefaultLocalView (const DefaultLocalView &other)
| Deep copy of the local view.
void | bind (const Element &e)
| Bind the view to a grid element.
bool | bound () const
| Return if the view is bound to a grid element.
const Element & | element () const
| Return the grid element that the view is bound to.
void | unbind ()
| Unbind from the current element.
const Tree & | tree () const
| Return the local ansatz tree associated to the bound entity.
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.
const MultiIndex & | index (size_type i) const
| Maps from subtree index set [0..size-1] to a globally unique multi index in global basis.
const GlobalBasis & | globalBasis () const
| Return the global basis that we are a view on.
const DefaultLocalView & | rootLocalView () const

## Protected Types

using | PreBasis = typename GlobalBasis::PreBasis
using | MultiIndexStorage

## Protected Attributes

const GlobalBasis * | globalBasis_
std::optional< Element > | element_
Tree | tree_
std::vector< MultiIndexStorage > | indices_

## Detailed Description

template<class GB>
class Dune::Functions::DefaultLocalView< GB >

The restriction of a finite element basis to a single element.

## Member Typedef Documentation

## Element

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::Element = typename GridView::template Codim<0>::Entity

Type of the grid element we are bound to.

## GlobalBasis

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::GlobalBasis = GB

The global FE basis that this is a view on.

## GridView

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::GridView = typename GlobalBasis::GridView

The grid view the global FE basis lives on.

## MultiIndex

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::MultiIndex

Initial value:
std::conditional_t<(PreBasis::minMultiIndexSize == PreBasis::maxMultiIndexSize),
StaticMultiIndex<size_type, PreBasis::maxMultiIndexSize>,
Dune::ReservedVector<size_type, PreBasis::multiIndexBufferSize>>
Dune::Functions::StaticMultiIndex
A statically sized MultiIndex type.
Definition multiindex.hh:30

Type used for global numbering of the basis vectors.

## MultiIndexStorage

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::MultiIndexStorage

protected

Initial value:
std::conditional_t<(PreBasis::minMultiIndexSize == PreBasis::maxMultiIndexSize),
OverflowArray<StaticMultiIndex<size_type, PreBasis::maxMultiIndexSize>, PreBasis::multiIndexBufferSize>,
Dune::ReservedVector<size_type, PreBasis::multiIndexBufferSize>>
Dune::Functions::OverflowArray
A dynamically sized array-like class with overflow.
Definition overflowarray.hh:49

## PreBasis

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::PreBasis = typename GlobalBasis::PreBasis

protected

## size_type

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::size_type = std::size_t

The type used for sizes.

## Tree

template<class GB>

using Dune::Functions::DefaultLocalView< GB >::Tree = typename GlobalBasis::PreBasis::Node

Tree of local finite elements / local shape function sets.

## Constructor & Destructor Documentation

## DefaultLocalView() [1/2]

template<class GB>

Dune::Functions::DefaultLocalView< GB >::DefaultLocalView | ( | const GlobalBasis & | globalBasis | ) |

inline

Construct local view for a given global finite element basis.

## DefaultLocalView() [2/2]

template<class GB>

Dune::Functions::DefaultLocalView< GB >::DefaultLocalView | ( | const DefaultLocalView< GB > & | other | ) |

inline

Deep copy of the local view.

## Member Function Documentation

## bind()

template<class GB>

void Dune::Functions::DefaultLocalView< GB >::bind | ( | const Element & | e | ) |

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.

## bound()

template<class GB>

bool Dune::Functions::DefaultLocalView< GB >::bound | ( |  | ) | const

inline

Return if the view is bound to a grid element.

## element()

template<class GB>

const Element & Dune::Functions::DefaultLocalView< GB >::element | ( |  | ) | const

inline

Return the grid element that the view is bound to.

Exceptions

  Dune::Exception | if the view is not bound to anything

## globalBasis()

template<class GB>

const GlobalBasis & Dune::Functions::DefaultLocalView< GB >::globalBasis | ( |  | ) | const

inline

Return the global basis that we are a view on.

## index()

template<class GB>

const MultiIndex & Dune::Functions::DefaultLocalView< GB >::index | ( | size_type | i | ) | const

inline

Maps from subtree index set [0..size-1] to a globally unique multi index in global basis.

## maxSize()

template<class GB>

size_type Dune::Functions::DefaultLocalView< GB >::maxSize | ( |  | ) | const

inline

Maximum local size for any element on the GridView.

This is the maximal size needed for local matrices and local vectors, i.e., the result is

## rootLocalView()

template<class GB>

const DefaultLocalView & Dune::Functions::DefaultLocalView< GB >::rootLocalView | ( |  | ) | const

inline

## size()

template<class GB>

size_type Dune::Functions::DefaultLocalView< GB >::size | ( |  | ) | const

inline

Total number of degrees of freedom on this element.

## tree()

template<class GB>

const Tree & Dune::Functions::DefaultLocalView< GB >::tree | ( |  | ) | const

inline

Return the local ansatz tree associated to the bound entity.

Returns
  Tree // This is tree

## unbind()

template<class GB>

void Dune::Functions::DefaultLocalView< GB >::unbind | ( |  | ) |

inline

Unbind from the current element.

Calling this method should only be a hint that the view can be unbound.

## Member Data Documentation

## element_

template<class GB>

std::optional<Element> Dune::Functions::DefaultLocalView< GB >::element_

protected

## globalBasis_

template<class GB>

const GlobalBasis* Dune::Functions::DefaultLocalView< GB >::globalBasis_

protected

## indices_

template<class GB>

std::vector<MultiIndexStorage> Dune::Functions::DefaultLocalView< GB >::indices_

protected

## tree_

template<class GB>

Tree Dune::Functions::DefaultLocalView< GB >::tree_

protected

The documentation for this class was generated from the following file:

- defaultlocalview.hh