KASKADE 7 development version
|
Convenience base class for the easy definition of variational functionals and weak formulations. More...
#include <functional_aux.hh>
Convenience base class for the easy definition of variational functionals and weak formulations.
Variational functionals and weak formulations need to provide meta information template classes D1 and D2 that give the assembler static information about the block structure of the problem. It is easy to forget parts of these meta data, in particular if they do not affect your current problem (yet they need to be defined for syntactical reasons).
Problem definitions may inherit this convenience base class, which defines safe but maybe inefficient defaults. These can be partially overridden as in the following example.
\seealso VariationalFunctional
Type | the kind of variational problem, either VariationalFunctional or WeakFormulation |
Definition at line 62 of file functional_aux.hh.
Classes | |
struct | B2 |
struct | D1 |
Static a priori default information about the right hand side blocks. More... | |
struct | D2 |
Static a priori default information about the matrix blocks. More... | |
Public Member Functions | |
template<class T > | |
bool | inDomain (T const &) const |
template<class Cell > | |
int | integrationOrder (Cell const &, int shapeFunctionOrder, bool) const |
Default implementation specifying the integration order. More... | |
template<class Face > | |
bool | considerFace (Face const &) const |
Default implementation for which faces are to be considered for assembly in case an InnerBoundaryCache is present. More... | |
template<int , int > | |
double | makePositiveThreshold () const |
Defines the eigenvalue threshold when enforcing positivity of local stiffness matrices. More... | |
Static Public Attributes | |
static constexpr ProblemType | type = Type |
|
inline |
Default implementation for which faces are to be considered for assembly in case an InnerBoundaryCache is present.
The default implementation is conservative, i.e. it assumes all faces should be considered. Redefine this in the actual implementation of the variational functional if only some faces need to be assembled.
Definition at line 182 of file functional_aux.hh.
|
inline |
Definition at line 71 of file functional_aux.hh.
|
inline |
Default implementation specifying the integration order.
This is a conservative choice for linear problems, with an integration order of twice the shape function order.
Definition at line 166 of file functional_aux.hh.
|
inline |
Defines the eigenvalue threshold when enforcing positivity of local stiffness matrices.
This default implementation defines this in principle as zero (i.e. aiming at positive semidefiniteness in its usual ldefinition), but accounts for some roundoff error during eigenvalue computation assuming assembly in double precision.
This method needs to be defined if D2<,>::makePositive == true
.
Definition at line 197 of file functional_aux.hh.
|
staticconstexpr |
Definition at line 66 of file functional_aux.hh.