#include <Thyra_ScalarProdBaseDecl.hpp>
Inheritance diagram for Thyra::ScalarProdBase< Scalar >:
Destructor | |
| virtual | ~ScalarProdBase () |
| | |
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 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 ScalarProdBase (i.e. 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 73 of file Thyra_ScalarProdBaseDecl.hpp.
|
|||||||||
|
Definition at line 80 of file Thyra_ScalarProdBaseDecl.hpp. |
|
||||||||||||||||||||
|
Return the scalar product of each column in two multi-vectors in the vector space.
Postconditions:
Implemented in Thyra::EuclideanScalarProd< Scalar >, and Thyra::LinearOpScalarProd< Scalar >. |
|
||||||||||||||||||||||||||||||||
|
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
where
Note that the special case of
that can be performed in half the flops as the general case. ToDo: Finish documentation! Implemented in Thyra::EuclideanScalarProd< Scalar >, and Thyra::LinearOpScalarProd< Scalar >. |
|
||||||||||||||||
|
Return the scalar product of two vectors in the vector space. Preconditions:
Postconditions:
The default implementation calls on the multi-vector version Definition at line 39 of file Thyra_ScalarProdBase.hpp. |
1.3.9.1