KASKADE 7 development version
|
A representation of a finite element function space defined over a domain covered by a grid.
More...
#include <functionspace.hh>
A representation of a finite element function space defined over a domain covered by a grid.
Elements of the space are defined in terms of shape functions defined over cells (codim 0 entities) of the grid and a LocalToglobalMapper (also known as node manager) combining local shape function coefficients on different cells to one global degree of freedom. Depending on the LocalToGlobalMapper, the finite element functions may be globally continuous or discontinuous, and may support pointwise evaluation of gradients besides the pointwise evaluation of function values.
The FEFunctionSpace defines an element type (a class that holds a certain function from the space) as well as evaluation cache classes that store global indices of local shape functions and values and possibly derivatives of shape functions at certain integration points.
Definition at line 1116 of file functionspace.hh.
Classes | |
struct | Element |
DEPRECATED use Element_t<m> instead. More... | |
struct | Evaluator |
A helper class that stores all informations necessary to evaluate FE functions at a certain point. More... | |
Public Types | |
using | GridView = typename LocalToGlobalMapper::GridView |
Type of grid view. More... | |
typedef GridView::Grid | Grid |
Type of grid. More... | |
typedef GridView::IndexSet | IndexSet |
Type of IndexSet. More... | |
typedef LocalToGlobalMapper::Scalar | Scalar |
using | field_type = Scalar |
The scalar field type on which the linear (function) space is based. This is provided for consistency with Dune. More... | |
typedef Grid::ctype | ctype |
Coordinate Type. More... | |
typedef LocalToGlobalMapper | Mapper |
corresponding mapper More... | |
template<int m> | |
using | Element_t = FunctionSpaceElement< Self, m > |
Defines the element function type. More... | |
using | SfValueType = typename Evaluator::VarArg::ValueType |
type of shape function values More... | |
Public Member Functions | |
template<typename... Args> | |
FEFunctionSpace (GridManagerBase< Grid > &gridMan, GridView const &gridView_, Args... args) | |
Constructs a finite element space from a GridManager, a grid view, and possibly extra arguments passed to the node manager. More... | |
FEFunctionSpace (GridManagerBase< Grid > &gridman_, Mapper &&m) | |
Constructs a finite element space from a directly given mapper. More... | |
FEFunctionSpace (FEFunctionSpace< LocalToGlobalMapper > const &fs) | |
Copy constructor. More... | |
~FEFunctionSpace () | |
size_t | degreesOfFreedom () const |
Returns the dimension of the function space, i.e. the number of degrees of freedom of a one-component function from this space. More... | |
Grid const & | grid () const |
Provides access to the grid on which this finite element space is defined. More... | |
GridManagerBase< Grid > & | gridManager () const |
Access to the GridManager. More... | |
IndexSet const & | indexSet () const |
Provides access to the index set defining the part of the grid on which the space is defined. More... | |
GridView const & | gridView () const |
Provides access to the index set defining the potential support of the space. More... | |
LocalToGlobalMapper const & | mapper () const |
Provides read access to the node manager. More... | |
LocalToGlobalMapper & | mapper () |
Provides read-write access to the node manager. More... | |
Evaluator | evaluator (ShapeFunctionCache< Grid, Scalar > *cache=nullptr, int deriv=1) const |
Creates a new evaluator for this space. More... | |
template<int m> | |
Element_t< m > | element () const |
Creates a new function in this function space. More... | |
std::vector< std::pair< size_t, SfValueType > > | linearCombination (Evaluator const &evaluator) const |
Returns the coefficients of the linear combination of global DoFs that define the value at the position specified by the given evaluator. More... | |
std::vector< std::pair< size_t, SfValueType > > | linearCombination (Cell< GridView > const &cell, LocalPosition< GridView > const &xi) const |
Returns the coefficients of the linear combination of global DoFs that define the value at the given position. More... | |
std::vector< std::pair< size_t, SfValueType > > | linearCombination (GlobalPosition< GridView > const &x) const |
Returns the coefficients of the linear combination of global DoFs that define the value at the given global position. More... | |
Public Attributes | |
boost::signals2::signal< void(typename TransferData< Self >::TransferMatrix const *) > | requestToRefine |
Signal for refinement. More... | |
Static Public Attributes | |
static int const | dim = Grid::dimension |
Grid dimension. More... | |
static int const | dimworld = Grid::dimensionworld |
spatial dimension More... | |
static int const | sfComponents = Mapper::ShapeFunctionSet::comps |
The number of components of shape functions. More... | |
static int const | continuity = Mapper::continuity |
Tells how often elements are globally continuously differentiable. More... | |
typedef Grid::ctype Kaskade::FEFunctionSpace< LocalToGlobalMapper >::ctype |
Coordinate Type.
Definition at line 1138 of file functionspace.hh.
using Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Element_t = FunctionSpaceElement<Self,m> |
Defines the element function type.
m | number of "components" A "component" is understood as a full shape function value. This can be a multi-component value as well. With vectorial shape functions (e.g. Nedelec edge elements), m==2 means you end up with 2*dim entries of type Scalar in the function's values. |
Definition at line 1181 of file functionspace.hh.
using Kaskade::FEFunctionSpace< LocalToGlobalMapper >::field_type = Scalar |
The scalar field type on which the linear (function) space is based. This is provided for consistency with Dune.
Definition at line 1135 of file functionspace.hh.
typedef GridView::Grid Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Grid |
Type of grid.
Definition at line 1124 of file functionspace.hh.
using Kaskade::FEFunctionSpace< LocalToGlobalMapper >::GridView = typename LocalToGlobalMapper::GridView |
Type of grid view.
Definition at line 1122 of file functionspace.hh.
typedef GridView::IndexSet Kaskade::FEFunctionSpace< LocalToGlobalMapper >::IndexSet |
Type of IndexSet.
Definition at line 1126 of file functionspace.hh.
typedef LocalToGlobalMapper Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Mapper |
corresponding mapper
Definition at line 1141 of file functionspace.hh.
typedef LocalToGlobalMapper::Scalar Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Scalar |
The scalar field type on which the linear (function) space is based.
Definition at line 1129 of file functionspace.hh.
using Kaskade::FEFunctionSpace< LocalToGlobalMapper >::SfValueType = typename Evaluator::VarArg::ValueType |
type of shape function values
Definition at line 1502 of file functionspace.hh.
|
inline |
Constructs a finite element space from a GridManager, a grid view, and possibly extra arguments passed to the node manager.
Note that the grid has to exist during the whole lifetime of the function space.
The construction from a GridManager, rather than a Grid makes sure, that the FEFunctionSpace is informed about grid modifications, such that data can be transfered from the original grid to the modified grid.
args | a parameter pack that is forwarded to the local to global mapper. If LocalToGlobalMapper is a LagrangeMapper or a HierarchicMapper, then the last argument arg denotes the polynomial order of the finite element space. |
Definition at line 1522 of file functionspace.hh.
|
inline |
Constructs a finite element space from a directly given mapper.
This allows constructing a function space without specifying its complete type, which is inferred from the mapper argument (since C++17).
m | the mapper, which is moved into the function space |
Definition at line 1544 of file functionspace.hh.
|
inline |
Copy constructor.
Definition at line 1556 of file functionspace.hh.
|
inline |
Definition at line 1565 of file functionspace.hh.
|
inline |
Returns the dimension of the function space, i.e. the number of degrees of freedom of a one-component function from this space.
Definition at line 1574 of file functionspace.hh.
Referenced by Kaskade::makeAuxiliarySpaceMultigridStack().
|
inline |
Creates a new function in this function space.
m | the number of components The returned function is initialized to zero. |
Definition at line 1621 of file functionspace.hh.
|
inline |
Creates a new evaluator for this space.
cache | an (optional) shape function cache to be used |
deriv | number of highest requested derivatives |
Definition at line 1613 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< LocalToGlobalMapper >::linearCombination().
|
inline |
Provides access to the grid on which this finite element space is defined.
Definition at line 1580 of file functionspace.hh.
|
inline |
Access to the GridManager.
Definition at line 1586 of file functionspace.hh.
Referenced by Kaskade::prolongationStack().
|
inline |
Provides access to the index set defining the potential support of the space.
Definition at line 1596 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Evaluator::gridView(), Kaskade::FEFunctionSpace< LocalToGlobalMapper >::linearCombination(), and Kaskade::prolongationStack().
|
inline |
Provides access to the index set defining the part of the grid on which the space is defined.
Definition at line 1591 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Evaluator::moveTo().
|
inline |
Returns the coefficients of the linear combination of global DoFs that define the value at the given position.
Let \( u(x) = \sum_j u_j \varphi_j(x) \) and \( J(x) := \{ j\in \mathbf{N} \mid x\in \mathrm{supp} \varphi_j \} \). Then this method returns \( \{ (j,\varphi_j(x)) \mid j \in J(x) \} \). This provides information about which global dof affects the value at a certain position, and how much.
The same information can be extracted more efficiently but with less convenience from an evaluator.
Definition at line 1667 of file functionspace.hh.
|
inline |
Returns the coefficients of the linear combination of global DoFs that define the value at the position specified by the given evaluator.
Let \( u(x) = \sum_j u_j \varphi_j(x) \) and \( J(x) := \{ j\in \mathbf{N} \mid x\in \mathrm{supp} \varphi_j \} \). Then this method returns \( \{ (j,\varphi_j(x)) \mid j \in J(x) \} \). This provides information about which global dof affects the value at a certain position, and how much.
The same information can be extracted more efficiently but with slightly less convenience directly from the evaluator.
Definition at line 1638 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< LocalToGlobalMapper >::linearCombination().
|
inline |
Returns the coefficients of the linear combination of global DoFs that define the value at the given global position.
Let \( u(x) = \sum_j u_j \varphi_j(x) \) and \( J(x) := \{ j\in \mathbf{N} \mid x\in \mathrm{supp} \varphi_j \} \). Then this method returns \( \{ (j,\varphi_j(x)) \mid j \in J(x) \} \). This provides information about which global dof affects the value at a certain position, and how much.
The same information can be extracted much more efficiently but with less convenience from cell and local position.
Definition at line 1689 of file functionspace.hh.
|
inline |
Provides read-write access to the node manager.
Definition at line 1606 of file functionspace.hh.
|
inline |
Provides read access to the node manager.
Definition at line 1601 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Evaluator::mapper(), Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Evaluator::moveTo(), Kaskade::prolongationStack(), and Kaskade::Limex< Eq >::step().
|
static |
Tells how often elements are globally continuously differentiable.
E.g., 0 means a globally continuous, but not differentiable function, -1 means a discontinuous function (with finite values), -2 may contain Dirac functionals etc.
Definition at line 1161 of file functionspace.hh.
|
static |
Grid dimension.
Definition at line 1144 of file functionspace.hh.
|
static |
spatial dimension
Definition at line 1147 of file functionspace.hh.
|
mutable |
Signal for refinement.
This signal is emitted after mesh refinement/coarsening. Clients are informed with a transfer matrix that allows to compute the new FE coefficients from the old ones. This is used by FEFunctions belonging to this space. Clients may start the transfer process asynchonously and return before completion.
If no transfer matrix is given (nullptr), clients are supposed to block until the transfer is finished.
Definition at line 1774 of file functionspace.hh.
|
static |
The number of components of shape functions.
Definition at line 1152 of file functionspace.hh.