|
dune-localfunctions 2.11
|
Type erasure class storing a local finite element. More...
#include <dune/localfunctions/common/localfiniteelement.hh>
Public Types | |
| using | Traits = typename VirtualLFE::Traits |
Public Member Functions | |
| LocalFiniteElement ()=default | |
| Default constructor. | |
| template<class LFEImpl, Dune::disableCopyMove< LocalFiniteElement, LFEImpl > = 0> | |
| LocalFiniteElement (LFEImpl &&lfe) | |
| Construct from implementation. | |
| LocalFiniteElement (const LocalFiniteElement &other) | |
| Copy constructor. | |
| LocalFiniteElement (LocalFiniteElement &&other)=default | |
| Move constructor. | |
| LocalFiniteElement & | operator= (const LocalFiniteElement &rhs) |
| Copy assignment. | |
| LocalFiniteElement & | operator= (LocalFiniteElement &&other)=default |
| Move assignment. | |
| operator bool () const | |
| Check if the LocalFiniteElement is not empty. | |
| const Traits::LocalBasisType & | localBasis () const |
| Access the LocalBasis of the stored local finite element. | |
| const Traits::LocalCoefficientsType & | localCoefficients () const |
| Access the LocalCoefficients of the stored local finite element. | |
| const Traits::LocalInterpolationType & | localInterpolation () const |
| Access the LocalInterpolation of the stored local finite element. | |
| unsigned int | size () const |
| Get the number of basis functions of the stored local finite element. | |
| const GeometryType & | type () const |
| Get the GeometryType of the stored local finite element. | |
Type erasure class storing a local finite element.
| LBT | A LocalBasisTraits class encoding the local basis signature. |
In the flavor of std::function this class implements a type erased wrapper around local finite element implementations. One can either construct the wrapper directly with the local finite element that should be stored or construct and empty wrapper and assign it later. The type erasure is internally implemented using LocalFiniteElementVirtualInterface and LocalFiniteElementVirtualImp. In contrast to these, the LocalFiniteElement provides value-semantics and encapsulates dynamic memory management.
| using Dune::LocalFiniteElement< LBT >::Traits = typename VirtualLFE::Traits |
|
default |
Default constructor.
The constructed wrapper is empty and can later be filled with a local finite element using the assignment operators.
|
inline |
Construct from implementation.
| LFEImpl | LocalFiniteElement implementation type |
| lfe | LocalFiniteElement implementation |
Construct a LocalFiniteElement wrapper storing a copy of the given local finite element object.
|
inline |
Copy constructor.
| other | The LocalFiniteElement to copy from |
Depending of the state of the argument, the newly constructed LocalFiniteElement will either be empty or contain a copy of the local finite element stored in the LocalFiniteElement passed as constructor argument.
|
default |
Move constructor.
| other | The LocalFiniteElement to move from |
Depending of the state of the argument, the newly constructed LocalFiniteElement will either be empty or contain the local finite element that was originally stored in the LocalFiniteElement passed as constructor argument.
|
inline |
Access the LocalBasis of the stored local finite element.
Calling this method if the LocalFiniteElement is empty will invoke undefined behavior.
|
inline |
Access the LocalCoefficients of the stored local finite element.
Calling this method if the LocalFiniteElement is empty will invoke undefined behavior.
|
inline |
Access the LocalInterpolation of the stored local finite element.
Calling this method if the LocalFiniteElement is empty will invoke undefined behavior.
|
inline |
Check if the LocalFiniteElement is not empty.
This method returns false if *this is empty and true otherwise
|
inline |
Copy assignment.
| rhs | The LocalFiniteElement to assign from |
This will first remove the stored local finite element. Then, depending of the state of the argument, *this will either be set to empty state or store a copy of the local finite element stored in the LocalFiniteElement passed as right hand side.
|
default |
Move assignment.
| other | The LocalFiniteElement to assign from |
This will first remove the stored local finite element. Then, depending of the state of the argument, *this will either be set to empty state or take over the local finite element stored in the LocalFiniteElement passed as right hand side. In any case the latter will be empty afterwards.
|
inline |
Get the number of basis functions of the stored local finite element.
The result of this method is unspecified if the LocalFiniteElement is empty.
|
inline |
Get the GeometryType of the stored local finite element.
The result of this method is unspecified if the LocalFiniteElement is empty.