![]() |
KASKADE 7 development version
|
A representation of a finite element function space defined over a domain covered by a grid. More...
#include <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. | |
| typedef GridView::Grid | Grid |
| Type of grid. | |
| typedef GridView::IndexSet | IndexSet |
| Type of IndexSet. | |
| 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. | |
| typedef Grid::ctype | ctype |
| Coordinate Type. | |
| typedef LocalToGlobalMapper | Mapper |
| corresponding mapper | |
| template<int m> | |
| using | Element_t = FunctionSpaceElement<Self,m> |
| Defines the element function type. | |
| using | SfValueType = typename Evaluator::VarArg::ValueType |
| type of shape function values | |
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. | |
| FEFunctionSpace (GridManagerBase< Grid > &gridman_, Mapper &&m) | |
| Constructs a finite element space from a directly given mapper. | |
| FEFunctionSpace (FEFunctionSpace< LocalToGlobalMapper > const &fs) | |
| Copy constructor. | |
| ~FEFunctionSpace () | |
| LocalToGlobalMapper const & | mapper () const |
| Provides read access to the node manager. | |
| LocalToGlobalMapper & | mapper () |
| Provides read-write access to the node manager. | |
| template<int m> | |
| Element_t< m > | element () const |
| Creates a new function in this function space. | |
General discretization information | |
| 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. | |
| int | order (Cell< GridView > const &cell) const |
| Provides the polynomial order of shape functions on the given cell. | |
| int | maxOrder () const |
| Returns the maximum polynomial order of the shape functions on any cell in the grid. | |
Underlying grid information | |
| Grid const & | grid () const |
| Provides access to the grid on which this finite element space is defined. | |
| GridManagerBase< Grid > & | gridManager () const |
| Access to the GridManager. | |
| IndexSet const & | indexSet () const |
| Provides access to the index set defining the part of the grid on which the space is defined. | |
| GridView const & | gridView () const |
| Provides access to the index set defining the potential support of the space. | |
Evaluation of functions | |
| Evaluator | evaluator (ShapeFunctionCache< Grid, Scalar > *cache=nullptr, int deriv=1) const |
| Creates a new evaluator for this space. | |
| std::vector< std::pair< size_t, SfValueType > > | linearCombination (Evaluator const &evaluator, bool cleaned=false) const |
| Returns the coefficients of the linear combination of global DoFs that define the value at the position specified by the given evaluator. | |
| std::vector< std::pair< size_t, SfValueType > > | linearCombination (Cell< GridView > const &cell, LocalPosition< GridView > const &xi, bool cleaned=false) const |
| Returns the coefficients of the linear combination of global DoFs that define the value at the given position. | |
| 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. | |
Public Attributes | |
| boost::signals2::signal< void(typename TransferData< Self >::TransferMatrix const *) > | requestToRefine |
| Signal for refinement. | |
Static Public Attributes | |
| static int const | dim = Grid::dimension |
| Grid dimension. | |
| static int const | dimworld = Grid::dimensionworld |
| spatial dimension | |
| static int const | sfComponents = Mapper::ShapeFunctionSet::comps |
| The number of components of shape functions. | |
| static int const | continuity = Mapper::continuity |
| Tells how often elements are globally continuously differentiable. | |
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 1181 of file functionspace.hh.
| typedef Grid::ctype Kaskade::FEFunctionSpace< LocalToGlobalMapper >::ctype |
Coordinate Type.
Definition at line 1203 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 1246 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 1200 of file functionspace.hh.
| typedef GridView::Grid Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Grid |
Type of grid.
Definition at line 1189 of file functionspace.hh.
| using Kaskade::FEFunctionSpace< LocalToGlobalMapper >::GridView = typename LocalToGlobalMapper::GridView |
Type of grid view.
Definition at line 1187 of file functionspace.hh.
| typedef GridView::IndexSet Kaskade::FEFunctionSpace< LocalToGlobalMapper >::IndexSet |
Type of IndexSet.
Definition at line 1191 of file functionspace.hh.
| typedef LocalToGlobalMapper Kaskade::FEFunctionSpace< LocalToGlobalMapper >::Mapper |
corresponding mapper
Definition at line 1206 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 1194 of file functionspace.hh.
| using Kaskade::FEFunctionSpace< LocalToGlobalMapper >::SfValueType = typename Evaluator::VarArg::ValueType |
type of shape function values
Definition at line 1572 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 1592 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 1614 of file functionspace.hh.
|
inline |
Copy constructor.
Definition at line 1626 of file functionspace.hh.
|
inline |
Definition at line 1635 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 1649 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 1718 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 1733 of file functionspace.hh.
|
inline |
Provides access to the grid on which this finite element space is defined.
Definition at line 1679 of file functionspace.hh.
|
inline |
Access to the GridManager.
Definition at line 1685 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 1696 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< DiscontinuousLagrangeMapper< double, Grid > >::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 1691 of file functionspace.hh.
|
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 1785 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.
| evaluator | the evaluator for the current cell and located at the current local position |
| cleaned | if true, terms with (almost) zero coefficient are removed |
Definition at line 1750 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< DiscontinuousLagrangeMapper< double, Grid > >::linearCombination(), and Kaskade::FEFunctionSpace< DiscontinuousLagrangeMapper< double, Grid > >::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 1808 of file functionspace.hh.
|
inline |
Provides read-write access to the node manager.
Definition at line 1710 of file functionspace.hh.
|
inline |
Provides read access to the node manager.
Definition at line 1705 of file functionspace.hh.
Referenced by Kaskade::FEFunctionSpace< DiscontinuousLagrangeMapper< double, Grid > >::maxOrder(), Kaskade::FEFunctionSpace< DiscontinuousLagrangeMapper< double, Grid > >::order(), Kaskade::prolongationStack(), and Kaskade::Limex< Eq >::step().
|
inline |
Returns the maximum polynomial order of the shape functions on any cell in the grid.
Definition at line 1662 of file functionspace.hh.
|
inline |
Provides the polynomial order of shape functions on the given cell.
Definition at line 1654 of file functionspace.hh.
|
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 1226 of file functionspace.hh.
|
static |
Grid dimension.
Definition at line 1209 of file functionspace.hh.
|
static |
spatial dimension
Definition at line 1212 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 1897 of file functionspace.hh.
|
static |
The number of components of shape functions.
Definition at line 1217 of file functionspace.hh.
Referenced by Kaskade::FunctionSpaceElement< FEFunctionSpace< BoundaryMapper >, m >::derivative(), Kaskade::FunctionSpaceElement< FEFunctionSpace< BoundaryMapper >, m >::hessian(), and Kaskade::FunctionSpaceElement< FEFunctionSpace< BoundaryMapper >, m >::value().