Inheritance diagram for Thyra::ScalarProdBase< Scalar >:
Public pure virtual functions that must be overridden
|virtual void||scalarProds (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, Scalar scalar_prods) const =0|
|Return the scalar product of each column in two multi-vectors in the vector space. |
|virtual void||apply (const EuclideanLinearOpBase< Scalar > &M, const ETransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const =0|
|Modify the application of a Euclidean linear operator by inserting the vector space's scalar product. |
Public virtual functions with default implementations
|virtual bool||isEuclidean () const|
|Return if this is a Euclidean (identity) scalar product is the same as the dot product. |
|virtual Scalar||scalarProd (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const|
|Return the scalar product of two vectors in the vector space. |
This interface is not considered a user-level interface. Instead, this interface is designed to be sub-classed off of and used with
ScalarProdVectorSpaceBase objects to define their scalar products. Applications should create subclasses of this interface to define application-specific scalar products (i.e. such as PDE finite-element codes often do).
This interface requires subclasses to override a multi-vector version of the scalar product function
scalarProds(). This version yields the most efficient implementation in a distributed memory environment by requiring only a single global reduction operation and a single communication.
Note that one of the preconditions on the vector and multi-vector arguments in
scalarProds() is a little vague in stating that the vector or multi-vector objects must be "compatible" with the underlying implementation of
*this. The reason that this precondition must be vague is that we can not expose a method to return a
VectorSpaceBase object that could be checked for compatibility since
ScalarProdBase is used to define a
VectorSpaceBase object (through the
VectorSpaceStdBase node subclass). Also, some definitions of
EuclideanScalarProd) will work for any vector space implementation since they only rely on
RTOp operators. In other cases, however, an application-specific scalar product may a have dependency on the data-structure of vector and multi-vector objects in which case one can not just use this with any vector or multi-vector implementation.
This interface class also defines functions to modify the application of a Euclidean linear operator to insert the definition of the application specific scalar product.
Definition at line 74 of file Thyra_ScalarProdBaseDecl.hpp.
|virtual Thyra::ScalarProdBase< Scalar >::~ScalarProdBase||(||)||
|virtual void Thyra::ScalarProdBase< Scalar >::scalarProds||(||const MultiVectorBase< Scalar > &||X,|
|const MultiVectorBase< Scalar > &||Y,|
Return the scalar product of each column in two multi-vectors in the vector space.
|scalar_prod||[out] Array (length |
Yare compatible with this implementation or an exception will be thrown.
scalar_prod[j] = this->scalarProd(*X.col(j),*Y.col(j)), for
j = 0 ... X.domain()->dim()-1
|virtual void Thyra::ScalarProdBase< Scalar >::apply||(||const EuclideanLinearOpBase< Scalar > &||M,|
|const MultiVectorBase< Scalar > &||X,|
|MultiVectorBase< Scalar > *||Y,|
Modify the application of a Euclidean linear operator by inserting the vector space's scalar product.
Note that one responsibility of an implementation of this function is to provide the block scalar product implementation of
MultiVectorBase objects that derive from
EuclideanLinearOpBase. For example, let
M be a
MultiVectorBase object and consider the operation
Y = adjoint(M)*X
M_trans==CONJTRANS. This function may, or many not, call the
EuclideanLinearOpBase::euclideanApplyTranspose() function in order to implement this block Scalar product.
Note that the special case of
M==X should also be supported which provides the symmetric operation
Y = adjoint(X)*X
that can be performed in half the flops as the general case.
ToDo: Finish documentation!
|bool Thyra::ScalarProdBase< Scalar >::isEuclidean||(||)|| const
|Scalar Thyra::ScalarProdBase< Scalar >::scalarProd||(||const VectorBase< Scalar > &||x,|
|const VectorBase< Scalar > &||y|
Return the scalar product of two vectors in the vector space.
yare compatible with
*thisimplementation or an exception will be thrown.
The default implementation calls on the multi-vector version