![]() |
KASKADE 7 development version
|
A class for storing a heterogeneous collection of FunctionSpaceElement s. More...
#include <variables.hh>
Public Types | |
| typedef VSDescriptions | Descriptions |
| Type of the VariableSetDescription. | |
| typedef VSDescriptions::RepresentationData | Functions |
| boost::fusion::vector of data elements (of type FunctionSpaceElement) | |
| typedef LinearProductSpace< Scalar, Functions > | LinearSpace |
| typedef Scalar | field_type |
| typedef VSDescriptions::RepresentationData | Sequence |
| boost::fusion::vector of element vectors. | |
| using | Component |
| The type of the m-th component. | |
Public Member Functions | |
| VariableSet ()=delete | |
| VariableSet (Self const &vs) | |
| Copy constructor. | |
| VariableSet (Self &&vs) | |
| Move constructor. | |
| VariableSet (Descriptions const &d) | |
| Constructor. | |
| Self & | operator= (Self const &v) |
| Assignment. | |
| Self & | operator= (Self &&v) |
| Move assignment. | |
| template<class S> | |
| Self & | operator= (S const &s) |
| Assignment from other (compatible) types. | |
| size_t | dim () const |
| Number of scalar degrees of freedom. This computes the total number of degrees of freedom, i.e. the sum of the dimensions of the components. | |
| Self & | operator+= (LinearProductSpace< Scalar, SequenceY > const &y) |
| In place addition. | |
| Self & | operator-= (Self const &y) |
| In place subtraction. | |
| Self & | axpy (Scalar a, Self const &y) |
| this <- this + a*y | |
| void | read (InIterator i) |
| DEPRECATED use vectorFromSequence instead. | |
| void | write (OutIterator i) const |
| DEPRECATED use vectorToSequence instead. | |
Evaluation of variables | |
| template<int i, class Evaluators> | |
| auto | value (Evaluators const &evals) const |
| Value of an individual variable in the set. | |
| template<int i> | |
| auto | value (Cell< GridView > const &cell, LocalPosition< GridView > const &xi) const |
| Value of an individual variable in the set. | |
| template<int i> | |
| auto | value (GlobalPosition< GridView > const &x) const |
| Value of an individual variable in the set. | |
| template<int i, class Evaluators> | |
| auto | derivative (Evaluators const &evals) const |
| Derivative of an individual variable in the set. | |
| template<int i> | |
| auto | derivative (Cell< GridView > const &cell, LocalPosition< GridView > const &xi) const |
| Derivative of an individual variable in the set. | |
| template<int i> | |
| auto | derivative (GlobalPosition< GridView > const &x) const |
| derivative of an individual variable in the set. \WARNING This method is comparatively DEAD SLOW. | |
| template<int i, class Evaluators> | |
| auto | hessian (Evaluators const &evals) const |
| Hessian of an individual variable in the set. | |
| template<int i> | |
| auto | hessian (Cell< GridView > const &cell, LocalPosition< GridView > const &xi) const |
| Hessian of an individual variable in the set. | |
| template<int i> | |
| auto | hessian (GlobalPosition< GridView > const &x) const |
| Hessian of an individual variable in the set. \WARNING This method is comparatively DEAD SLOW. | |
Assignment | |
| Self & | operator*= (Scalar a) |
| Scaling. | |
Scalar products and norms | |
| field_type | operator* (Self const &y) const |
| Scalar product. | |
| field_type | dot (Self const &y) const |
| Scalar product. | |
| double | two_norm2 () const |
| squared euclidean norm | |
| double | two_norm () const |
| euclidean norm | |
Public Attributes | |
| Descriptions const * | descriptions |
| Descriptions of variable set, of type VariableSetDescription (lots of useful infos) | |
| Sequence | data |
| Data. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| auto const & | component (LinearProductSpace< Scalar, Sequence > const &x) |
| Provides access to the m-th component of a product space. | |
| auto | cartesianProduct (X0 const &x0, Xs const &... xs) |
| Creates a cartesian product of the given vectors, i.e. a LinearProductSpace object. | |
| OutIter | vectorToSequence (LinearProductSpace< Scalar, VSDescriptions::RepresentationData > const &v, OutIter i) |
| writes the coefficients of a vector to a flat scalar sequence <Scalar,Seq> | |
| InIter | vectorFromSequence (LinearProductSpace< Scalar, VSDescriptions::RepresentationData > &v, InIter i) |
| reads the coefficients of a vector from a flat scalar sequence <Scalar,Seq> | |
A class for storing a heterogeneous collection of FunctionSpaceElement s.
| Descriptions | a VariableSetDescription class |
Basic vector operations and I/O are supported.
The type of a VariableSet is defined via a VariableSetDescription, which contains information about the variables in form of a boost::fusion::vector of FEFunctionSpace s and VariableDescription s. The type of a VariableSet can be determined by VariableSetDescription::VariableSet.
VariableSet s contains a collection of FunctionSpaceElement s (vars) and a reference to its VariableSetDescription (descriptions). Simultaneous evaluation of all functions is supported by evaluateVariables.
Usually, solutions are stored in VariableSets. Access to data is via the public member variable data, which is a boost::fusion::vector of FunctionSpaceElement s
Definition at line 335 of file variables.hh.
|
inherited |
The type of the m-th component.
Definition at line 104 of file linearspace.hh.
| typedef VSDescriptions Kaskade::VariableSet< VSDescriptions >::Descriptions |
Type of the VariableSetDescription.
Definition at line 340 of file variables.hh.
|
inherited |
Definition at line 94 of file linearspace.hh.
| typedef VSDescriptions::RepresentationData Kaskade::VariableSet< VSDescriptions >::Functions |
boost::fusion::vector of data elements (of type FunctionSpaceElement)
Definition at line 343 of file variables.hh.
| typedef LinearProductSpace<Scalar,Functions> Kaskade::VariableSet< VSDescriptions >::LinearSpace |
Definition at line 355 of file variables.hh.
|
inherited |
boost::fusion::vector of element vectors.
Definition at line 97 of file linearspace.hh.
|
delete |
|
inline |
Copy constructor.
Definition at line 361 of file variables.hh.
|
inline |
Move constructor.
Definition at line 367 of file variables.hh.
|
inlineexplicit |
Constructor.
This creates a zero-initialized set of variables.
| d | the VariableSetDescription object (has to exist during the lifetime of this VariableSet). |
Definition at line 380 of file variables.hh.
|
inlineinherited |
this <- this + a*y
Definition at line 233 of file linearspace.hh.
|
inline |
Derivative of an individual variable in the set.
Definition at line 482 of file variables.hh.
|
inline |
Derivative of an individual variable in the set.
Definition at line 472 of file variables.hh.
|
inline |
derivative of an individual variable in the set. \WARNING This method is comparatively DEAD SLOW.
Definition at line 492 of file variables.hh.
|
inlineinherited |
Number of scalar degrees of freedom. This computes the total number of degrees of freedom, i.e. the sum of the dimensions of the components.
Definition at line 154 of file linearspace.hh.
|
inlineinherited |
Scalar product.
Definition at line 303 of file linearspace.hh.
|
inline |
Hessian of an individual variable in the set.
Definition at line 511 of file variables.hh.
|
inline |
Hessian of an individual variable in the set.
Definition at line 501 of file variables.hh.
|
inline |
Hessian of an individual variable in the set. \WARNING This method is comparatively DEAD SLOW.
Definition at line 521 of file variables.hh.
|
inlineinherited |
Scalar product.
For two vectors \( (x_i)_{i=0,\dots,n-1} \) and \( (y_i)_{i=0,\dots,n-1}\) this computes and returns the euclidean scalar product
\[ \sum_{i=0}^{n-1} \langle x_i , y_i \rangle. \]
For the entries' scalar products, the operator*() is called.
Definition at line 293 of file linearspace.hh.
|
inlineinherited |
Definition at line 213 of file linearspace.hh.
|
inlineinherited |
In place addition.
Definition at line 221 of file linearspace.hh.
|
inlineinherited |
In place subtraction.
Definition at line 227 of file linearspace.hh.
|
inline |
Assignment from other (compatible) types.
Compatible types are those for which the base class LinearProductSpace<...> has a matching assignment operator. This includes, in particular, the coefficient vector representation Descriptions::CoefficientVectorRepresentation::type, i.e. a LinearProductSpace<Scalar,DuneBlockVector<...>> with matching entries and lengths.
Definition at line 418 of file variables.hh.
|
inline |
Move assignment.
Definition at line 399 of file variables.hh.
|
inline |
Assignment.
Definition at line 388 of file variables.hh.
|
inlineinherited |
DEPRECATED use vectorFromSequence instead.
Reads the coefficients sequentially from an input iterator. The InIterator's value type must be convertible to field_type.
Definition at line 245 of file linearspace.hh.
|
inlineinherited |
euclidean norm
Definition at line 319 of file linearspace.hh.
|
inlineinherited |
squared euclidean norm
Definition at line 311 of file linearspace.hh.
|
inline |
Value of an individual variable in the set.
| i | the index of the variable to evaluate |
| cell | the cell in which to evaluate the variable |
| xi | the local coordinate within the cell at which to evaluate |
Definition at line 451 of file variables.hh.
|
inline |
Value of an individual variable in the set.
| i | the index of the variable to evaluate |
| Evaluators | a boost::fusion sequence of evaluators, corresponding to the list of spaces of this variable set |
Definition at line 436 of file variables.hh.
|
inline |
Value of an individual variable in the set.
| i | the index of the variable to evaluate |
| x | the global coordinate within the geometry at which to evaluate \WARNING This method is comparatively DEAD SLOW. |
Definition at line 463 of file variables.hh.
|
inlineinherited |
DEPRECATED use vectorToSequence instead.
Writes the coefficients sequentially to an output iterator (flattening). The field_type must be convertible to the OutIterator's value type.
Definition at line 265 of file linearspace.hh.
|
Creates a cartesian product of the given vectors, i.e. a LinearProductSpace object.
Definition at line 488 of file linearspace.hh.
|
Provides access to the m-th component of a product space.
This simplifies the access to individual components of a product space, e.g., a variable set of finite element functions. Instead of
one can write
| m | the index of the component (nonnegative) |
| Scalar | a scalar type |
| Sequence | a boost::fusion sequence type |
Definition at line 458 of file linearspace.hh.
Referenced by Kaskade::VariableSet< Descriptions >::derivative(), Kaskade::VariableSet< Descriptions >::derivative(), Kaskade::VariableSet< Descriptions >::derivative(), Kaskade::VariableSet< Descriptions >::hessian(), Kaskade::VariableSet< Descriptions >::hessian(), Kaskade::VariableSet< Descriptions >::hessian(), Kaskade::VariableSet< Descriptions >::value(), Kaskade::VariableSet< Descriptions >::value(), and Kaskade::VariableSet< Descriptions >::value().
|
reads the coefficients of a vector from a flat scalar sequence <Scalar,Seq>
Definition at line 515 of file linearspace.hh.
|
writes the coefficients of a vector to a flat scalar sequence <Scalar,Seq>
Definition at line 503 of file linearspace.hh.
|
inherited |
Data.
Definition at line 329 of file linearspace.hh.
Referenced by Kaskade::coarsening(), LossyStorage< Grid, VariableSet, Space, QuantizationPolicy >::decode(), LossyStorage< Grid, VariableSet, Space, QuantizationPolicy >::encode(), Kaskade::EmbeddedErrorEstimator< VariableSetDescription, Scaling >::estimate(), and Kaskade::VariableSet< Descriptions >::operator=().
| Descriptions const* Kaskade::VariableSet< VSDescriptions >::descriptions |
Descriptions of variable set, of type VariableSetDescription (lots of useful infos)
Definition at line 529 of file variables.hh.
Referenced by Kaskade::BWErrorFunction< Description, Grid, Functional, FunctionalSimpl >::getErrorFunction(), Kaskade::BWErrorFunction< Description, Grid, Functional, FunctionalSimpl >::getFullErrorFunction(), Kaskade::gridIterate(), Kaskade::VariableSet< Descriptions >::operator=(), Kaskade::projectHierarchically(), Kaskade::uniformEmbeddedErrorEstimation(), Kaskade::writeAMIRAFile(), Kaskade::writePartialFile(), and Kaskade::writeVTK().