#include <Thyra_VectorSpaceBaseDecl.hpp>
Inheritance diagram for Thyra::VectorSpaceBase< Scalar >:
Public pure virtual functions that must be overridden | |
| virtual Index | dim () const =0 |
| Return the dimension of the vector space. | |
| virtual bool | isCompatible (const VectorSpaceBase< Scalar > &vecSpc) const =0 |
| Compare the compatibility of two vector spaces. | |
| virtual Teuchos::RefCountPtr< const VectorSpaceFactoryBase< Scalar > > | smallVecSpcFcty () const =0 |
Return a VectorSpaceFactoryBase object for the creation of (serial) vector spaces with a small dimension. | |
| virtual Scalar | scalarProd (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const =0 |
| Return the scalar product of two vectors in the vector space. | |
| 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. | |
Public virtual functions with default implementations | |
| virtual bool | isInCore () const |
| Returns if all of the vector elements are cheaply accessible on this processor. | |
| virtual Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > | clone () const |
| Clone this object (if supported). | |
Protected pure virtual functions that must be overridden | |
| virtual Teuchos::RefCountPtr< VectorBase< Scalar > > | createMember () const =0 |
| Create a vector member from the vector space. | |
| virtual Teuchos::RefCountPtr< MultiVectorBase< Scalar > > | createMembers (int numMembers) const =0 |
Create a set of vector members (a MultiVectorBase) from the vector space. | |
| virtual Teuchos::RefCountPtr< VectorBase< Scalar > > | createMemberView (const RTOpPack::MutableSubVectorT< Scalar > &raw_v) const =0 |
Create a vector member that is a non-const view of raw vector data. | |
| virtual Teuchos::RefCountPtr< const VectorBase< Scalar > > | createMemberView (const RTOpPack::SubVectorT< Scalar > &raw_v) const =0 |
Create a vector member that is a const view of raw vector data. | |
| virtual Teuchos::RefCountPtr< MultiVectorBase< Scalar > > | createMembersView (const RTOpPack::MutableSubMultiVectorT< Scalar > &raw_mv) const =0 |
Create a multi-vector member that is a non-const view of raw multi-vector data. | |
| virtual Teuchos::RefCountPtr< const MultiVectorBase< Scalar > > | createMembersView (const RTOpPack::SubMultiVectorT< Scalar > &raw_mv) const =0 |
Create a multi-vector member that is a const view of raw multi-vector data. | |
This interface acts primarily as an "Abstract Factory" interface for creating VectorBase objects using the Thyra::createMember(). A VectorSpaceBase can also create MultiVectorBase objects which represent a compact collection of vectors. A secondary role for VectorSpaceBase objects is to test for compatibility of vector spaces (and the vectors and linear operators using those spaces) objects using the isCompatible() method.
Clients can not directly create VectorBase and MultiVectorBase objects using the member functions createMember(), createMembers(), createMemberView(), and createMembersView() but instead must use the non-member User callable creational functions for VectorBase and MultiVectorBase..
Note that a VectorSpaceBase object must also be able to create MultiVectorBase objects with any number of column vectors using the Thyra::createMembers() function. Once created, the LinearOpBase::domain() function supported by the created MultiVectorBase objects returns a vector space of that dimension. An interesting implication of this design is that the creation of a multi-vector provides a way for clients to create vector spaces of any arbitrary (although small usually) dimension. In order to give the client the same ability to create smaller vector spaces without having to create a dummy multi-vector object first, the method smallVecSpcFcty() is included. The method smallVecSpcFcty() returns a VectorSpaceFactoryBase object that can create (serial) vector spaces of any small dimension that are compatible with the domain spaces of so created MultiVectorBase objects.
A vector space is also where the scalar product for the space is defined which is computed by the scalarProd() method. A scalar product allows the vector space to introduce scaling into many different types of numerical algorithms.
If the underlying object is not initialized, then dim()==0 will be true and none of the other methods should be called or exceptions will be thrown.
Notes for subclass developers
This is a fairly bare-bones interface class without much in the way of default function implementations. The subclass VectorSpaceDefaultBase provides a default multi-vector implementation and should the the first choice for subclasses implementations.
Definition at line 215 of file Thyra_VectorSpaceBaseDecl.hpp.
|
|||||||||
|
Return the dimension of the vector space.
If the underlying object is not initialized, then Implemented in Thyra::MPIVectorSpaceBase< Scalar >, Thyra::SerialVectorSpaceStd< Scalar >, and Thyra::ProductVectorSpace< Scalar >. |
|
||||||||||
|
Compare the compatibility of two vector spaces.
If this function returns Preconditions:
Postconditions:
Invariants:
Implemented in Thyra::MPIVectorSpaceBase< Scalar >, Thyra::SerialVectorSpaceBase< Scalar >, and Thyra::ProductVectorSpace< Scalar >. |
|
|||||||||
|
Return a Preconditions:
Implemented in Thyra::MPIVectorSpaceBase< Scalar >, Thyra::VectorSpaceDefaultBase< Scalar >, and Thyra::ProductVectorSpace< Scalar >. |
|
||||||||||||||||
|
Return the scalar product of two vectors in the vector space. Preconditions:
Postconditions:
Implemented in Thyra::ScalarProdVectorSpaceBase< Scalar >, and Thyra::ProductVectorSpace< Scalar >. |
|
||||||||||||||||||||
|
Return the scalar product of each column in two multi-vectors in the vector space.
Postconditions:
Implemented in Thyra::ScalarProdVectorSpaceBase< Scalar >, and Thyra::ProductVectorSpace< Scalar >. |
|
|||||||||
|
Returns if all of the vector elements are cheaply accessible on this processor. Preconditions:
The default implementation returns Reimplemented in Thyra::MPIVectorSpaceBase< Scalar >, Thyra::SerialVectorSpaceBase< Scalar >, and Thyra::ProductVectorSpace< Scalar >. Definition at line 41 of file Thyra_VectorSpaceBase.hpp. |
|
|||||||||
|
Clone this object (if supported).
It is allowed for Preconditions:
The default implementation returns Reimplemented in Thyra::MPIVectorSpaceStd< Scalar >, Thyra::SerialVectorSpaceStd< Scalar >, and Thyra::ProductVectorSpace< Scalar >. Definition at line 48 of file Thyra_VectorSpaceBase.hpp. |
|
|||||||||
|
Create a vector member from the vector space. Preconditions:
Postconditions: Note: This function is not to be called directly since it is protected! See the User callable creational functions for VectorBase and MultiVectorBase..
Implemented in Thyra::MPIVectorSpaceStd< Scalar >, Thyra::SerialVectorSpaceStd< Scalar >, and Thyra::ProductVectorSpace< Scalar >. |
|
||||||||||
|
Create a set of vector members (a Preconditions:
Postconditions:
Implemented in Thyra::MPIVectorSpaceStd< Scalar >, Thyra::SerialVectorSpaceStd< Scalar >, Thyra::VectorSpaceDefaultBase< Scalar >, and Thyra::ProductVectorSpace< Scalar >. |
|
||||||||||
|
Create a vector member that is a non-
Postconditions:
It is stated here that the client can not expect that the values pointed to by Implemented in Thyra::MPIVectorSpaceStd< Scalar >, and Thyra::VectorSpaceDefaultBase< Scalar >. |
|
||||||||||
|
Create a vector member that is a
RTOpPack::MutableSubVectorT object except that this version takes a RTOpPack::SubVectorT and returns a smart pointer to a const VectorBase object.Preconditions:
Postconditions:
Implemented in Thyra::MPIVectorSpaceStd< Scalar >, and Thyra::VectorSpaceDefaultBase< Scalar >. |
|
||||||||||
|
Create a multi-vector member that is a non-
Postconditions:
It is stated here that the client can not expect that the values pointed to by Implemented in Thyra::MPIVectorSpaceStd< Scalar >, and Thyra::VectorSpaceDefaultBase< Scalar >. |
|
||||||||||
|
Create a multi-vector member that is a
RTOpPack::MutableSubMultiVectorT object except that this version takes a RTOpPack::SubMultiVectorT object and returns a smart pointer to a const MultiVectorBase object.Preconditions:
Postconditions:
Implemented in Thyra::MPIVectorSpaceStd< Scalar >, and Thyra::VectorSpaceDefaultBase< Scalar >. |
1.3.9.1