Thyra::ProductVectorBase< Scalar > Class Template Reference
[Thyra operator/vector extended interfaces]

Base interface for product vectors. More...

#include <Thyra_ProductVectorBase.hpp>

Inheritance diagram for Thyra::ProductVectorBase< Scalar >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual RCP< VectorBase< Scalar > > getNonconstVectorBlock (const int k)=0
 Returns a non-persisting non-const view of the (zero-based) kth block vector.
virtual RCP< const VectorBase
< Scalar > > 
getVectorBlock (const int k) const =0
 Returns a non-persisting const view of the (zero-based) kth block vector.

Related Functions

(Note that these are not member functions.)



template<class Scalar >
RCP< Thyra::ProductVectorBase
< Scalar > > 
nonconstProductVectorBase (const RCP< Thyra::VectorBase< Scalar > > &v)
 Dynamic cast from a VectorBase to a ProductVectorBase object and thow exception if this fails.
template<class Scalar >
RCP< const
Thyra::ProductVectorBase
< Scalar > > 
productVectorBase (const RCP< const Thyra::VectorBase< Scalar > > &v)
 Dynamic cast from a const VectorBase to a const ProductVectorBase object and thow exception if this fails.

Detailed Description

template<class Scalar>
class Thyra::ProductVectorBase< Scalar >

Base interface for product vectors.

This class defines an abstract interface for a vector that is built out of the one or more other vectors to form what mathematicians like to call a "product vector".

A product vector is simply the concatenation of two or more vectors to form a larger "composite" vector. Specifically, a product vector with numBlock constituent block vectors represents the blocked vector


         [ v[0]           ]
         [ v[1]           ]
 this =  [ .              ]
         [ v[numBlocks-1] ]
 

The constituent vectors v[k] can be accessed through the const and non-const access functions getBlock().

A product vector knows its product space which is returned by the productSpace() function. A ProductVectorBase object is created by a ProductVectorSpaceBase object and never directly created by clients.

This class is only an interface. A standard implementation of this interface that should be sufficient for 99% or so of use cases is provided in the concrete subclass DefaultProductVector.

Definition at line 72 of file Thyra_ProductVectorBase.hpp.


Member Function Documentation

template<class Scalar>
virtual RCP<VectorBase<Scalar> > Thyra::ProductVectorBase< Scalar >::getNonconstVectorBlock ( const int  k  )  [pure virtual]

Returns a non-persisting non-const view of the (zero-based) kth block vector.

Parameters:
k [in] The (zero-based) kth block index specifying which vector block to access.

Preconditions:

Note that *this is not guaranteed to be modified until the smart pointer returned from this function, as well as any other smart pointers created from this smart pointer, are destroyed. This requirement allows more flexibility in how this function is implemented.

Also note that no further interactions with *this should be performed until the view returned from this function is released as described above.

Implemented in Thyra::DefaultMultiVectorProductVector< Scalar >, Thyra::DefaultProductVector< Scalar >, and Thyra::DefaultClusteredSpmdProductVector< Scalar >.

template<class Scalar>
virtual RCP<const VectorBase<Scalar> > Thyra::ProductVectorBase< Scalar >::getVectorBlock ( const int  k  )  const [pure virtual]

Returns a non-persisting const view of the (zero-based) kth block vector.

Parameters:
k [in] The (zero-based) kth block index specifying which vectorblock to access.

Preconditions:

Implemented in Thyra::DefaultMultiVectorProductVector< Scalar >, Thyra::DefaultProductVector< Scalar >, and Thyra::DefaultClusteredSpmdProductVector< Scalar >.


Friends And Related Function Documentation

template<class Scalar >
RCP< Thyra::ProductVectorBase< Scalar > > nonconstProductVectorBase ( const RCP< Thyra::VectorBase< Scalar > > &  v  )  [related]

Dynamic cast from a VectorBase to a ProductVectorBase object and thow exception if this fails.

Definition at line 133 of file Thyra_ProductVectorBase.hpp.

template<class Scalar >
RCP< const Thyra::ProductVectorBase< Scalar > > productVectorBase ( const RCP< const Thyra::VectorBase< Scalar > > &  v  )  [related]

Dynamic cast from a const VectorBase to a const ProductVectorBase object and thow exception if this fails.

Definition at line 149 of file Thyra_ProductVectorBase.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:00:42 2011 for Thyra by  doxygen 1.6.3