![]() |
KASKADE 7 development version
|
#include <linearspace.hh>
Public Types | |
| typedef Scalar_ | Scalar |
| scalar type | |
| typedef Scalar | field_type |
| typedef Seq | Sequence |
| boost::fusion::vector of element vectors. | |
| typedef Seq | Functions |
| template<int m> | |
| using | Component = std::remove_reference_t<typename boost::fusion::result_of::at_c<Sequence,m>::type> |
| The type of the m-th component. | |
Public Member Functions | |
| LinearProductSpace ()=delete | |
| 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. | |
| template<class SequenceY> | |
| 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 | |
| template<class InIterator> | |
| void | read (InIterator i) |
| DEPRECATED use vectorFromSequence instead. | |
| template<class InIterator> | |
| void | read (int rbegin, int rend, InIterator i) |
| Reads the coefficients of the subrange [rbegin,rend[ sequentially from an input iterator. The InIterator's value type must be convertible to field_type. | |
| template<class OutIterator> | |
| void | write (OutIterator i) const |
| DEPRECATED use vectorToSequence instead. | |
| template<class DataOutIter> | |
| void | write (int rbegin, int rend, DataOutIter i) const |
| Writes the coefficients of the subrange [rbegin,rend[ sequentially to an output iterator. The InIterator's value type must be convertible to field_type. | |
Construction | |
| LinearProductSpace (LinearProductSpace< Scalar, Sequence > const &y) | |
| Copy constructor. | |
| LinearProductSpace (LinearProductSpace< Scalar, Sequence > &&y) | |
| Move constructor. | |
| template<class VSDescriptions> | |
| LinearProductSpace (const VariableSet< VSDescriptions > &y) | |
| Copy from VariableSet. | |
| template<class S> | |
| LinearProductSpace (S const &init) | |
| Constructor with explicit data. | |
| template<typename... Args> | |
| LinearProductSpace (boost::fusion::transform_view< Args... > const &data_) | |
Assignment | |
| Self & | operator= (Self const &y) |
| Assignment from the same type. | |
| template<class VSDescriptions> | |
| Self & | operator= (VariableSet< VSDescriptions > const &y) |
| Assignment from a different (hopefully compatible) type. | |
| template<class OtherSeq> | |
| Self & | operator= (LinearProductSpace< Scalar, OtherSeq > const &y) |
| Assignment from a different (hopefully compatible) type. | |
| template<class FunctionSpace, int m> | |
| Self & | operator= (FunctionSpaceElement< FunctionSpace, m > const &fse) |
| Assignment from a (hopefully compatible) FunctionSpaceElement. | |
| Self & | operator= (Scalar a) |
| Assignment to constant scalar. | |
| template<class First, class Last> | |
| Self & | operator= (boost::fusion::iterator_range< First, Last > range) |
| Assignment from a (hopefully compatible) boost::fusion iterator range. | |
| 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 | |
| Sequence | data |
| Data. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<int m, class LinearProductSpace> | |
| using | Component = typename LinearProductSpace::template Component<m> |
| The type of the m-th component of a product space. | |
| template<int m, class Scalar, class Sequence> | |
| auto const & | component (LinearProductSpace< Scalar, Sequence > const &x) |
| Provides access to the m-th component of a product space. | |
| template<class X0, class ... Xs> | |
| auto | cartesianProduct (X0 const &x0, Xs const &... xs) |
| Creates a cartesian product of the given vectors, i.e. a LinearProductSpace object. | |
| template<class Scalar, class Seq, class OutIter> | |
| OutIter | vectorToSequence (LinearProductSpace< Scalar, Seq > const &v, OutIter i) |
| writes the coefficients of a vector to a flat scalar sequence <Scalar,Seq> | |
| template<class Scalar, class Seq, class InIter> | |
| InIter | vectorFromSequence (LinearProductSpace< Scalar, Seq > &v, InIter i) |
| reads the coefficients of a vector from a flat scalar sequence <Scalar,Seq> | |
A product space of linear spaces.
Access to the components of the product space is provided by the component function:
Arithmetic operations are delegated componentwise to the heterogeneous subspaces.
| Scalar | the scalar field type of the linear space |
| Seq | a boost::fusion sequence type defining the variables of the cartesian product |
Definition at line 76 of file linearspace.hh.
| using Kaskade::LinearProductSpace< Scalar_, Seq >::Component = std::remove_reference_t<typename boost::fusion::result_of::at_c<Sequence,m>::type> |
The type of the m-th component.
Definition at line 104 of file linearspace.hh.
| typedef Scalar Kaskade::LinearProductSpace< Scalar_, Seq >::field_type |
Definition at line 94 of file linearspace.hh.
| typedef Seq Kaskade::LinearProductSpace< Scalar_, Seq >::Functions |
Definition at line 98 of file linearspace.hh.
| typedef Scalar_ Kaskade::LinearProductSpace< Scalar_, Seq >::Scalar |
scalar type
Definition at line 93 of file linearspace.hh.
| typedef Seq Kaskade::LinearProductSpace< Scalar_, Seq >::Sequence |
boost::fusion::vector of element vectors.
Definition at line 97 of file linearspace.hh.
|
delete |
|
inline |
Copy constructor.
Definition at line 115 of file linearspace.hh.
|
inline |
Move constructor.
Definition at line 120 of file linearspace.hh.
|
inlineexplicit |
Copy from VariableSet.
Definition at line 124 of file linearspace.hh.
|
inlineexplicit |
Constructor with explicit data.
| S | a type convertible to Sequence |
| init | a sequence type from which the components are initialized |
Definition at line 136 of file linearspace.hh.
|
inlineexplicit |
Definition at line 140 of file linearspace.hh.
|
inline |
this <- this + a*y
Definition at line 233 of file linearspace.hh.
|
inline |
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.
|
inline |
Scalar product.
Definition at line 303 of file linearspace.hh.
|
inline |
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.
|
inline |
Definition at line 213 of file linearspace.hh.
|
inline |
In place addition.
Definition at line 221 of file linearspace.hh.
|
inline |
In place subtraction.
Definition at line 227 of file linearspace.hh.
|
inline |
Assignment from a (hopefully compatible) boost::fusion iterator range.
Definition at line 204 of file linearspace.hh.
|
inline |
Assignment from a (hopefully compatible) FunctionSpaceElement.
Definition at line 190 of file linearspace.hh.
|
inline |
Assignment from a different (hopefully compatible) type.
Definition at line 180 of file linearspace.hh.
|
inline |
Assignment to constant scalar.
Definition at line 197 of file linearspace.hh.
|
inline |
Assignment from the same type.
Definition at line 165 of file linearspace.hh.
|
inline |
Assignment from a different (hopefully compatible) type.
Definition at line 169 of file linearspace.hh.
|
inline |
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.
|
inline |
Reads the coefficients of the subrange [rbegin,rend[ sequentially from an input iterator. The InIterator's value type must be convertible to field_type.
Definition at line 255 of file linearspace.hh.
|
inline |
euclidean norm
Definition at line 319 of file linearspace.hh.
Referenced by Kaskade::uniformEmbeddedErrorEstimation().
|
inline |
squared euclidean norm
Definition at line 311 of file linearspace.hh.
Referenced by Kaskade::LinearProductSpace< Scalar, Functions >::two_norm().
|
inline |
Writes the coefficients of the subrange [rbegin,rend[ sequentially to an output iterator. The InIterator's value type must be convertible to field_type.
Definition at line 275 of file linearspace.hh.
|
inline |
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.
| Sequence Kaskade::LinearProductSpace< Scalar_, Seq >::data |
Data.
Definition at line 329 of file linearspace.hh.
Referenced by Kaskade::LinearSpace_Detail::Copy< VariableSet< VSDescriptions >, Space, 0 >::apply(), Kaskade::LinearSpace_Detail::Copy< VariableSet< VSDescriptions >, Space, id >::apply(), Kaskade::UzawaSolver< X, Y >::apply(), Kaskade::component(), Kaskade::LinearProductSpace< Scalar, Functions >::component(), Kaskade::evaluateVariables(), Kaskade::VTKReader::getCoefficients(), Kaskade::gridIterate(), Kaskade::LinearProductSpace< Scalar, Functions >::operator*(), Kaskade::LinearProductSpace< Scalar, Functions >::operator=(), Kaskade::LinearProductSpace< Scalar, Functions >::operator=(), Kaskade::projectHierarchically(), Kaskade::LinearProductSpace< Scalar, Functions >::vectorFromSequence(), Kaskade::LinearProductSpace< Scalar, Functions >::vectorToSequence(), Kaskade::writePartialFile(), and Kaskade::writeVTK().