Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Thyra::VectorSpaceDefaultBase< Scalar > Class Template Reference

Node VectorSpaceBase subclass that provides default implementations for many functions using a default multi-vectors implementation. More...

#include <Thyra_VectorSpaceDefaultBase_decl.hpp>

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

Protected functions overridden from VectorSpaceBase

RCP< MultiVectorBase< Scalar > > createMembers (int numMembers) const
 
RCP< VectorBase< Scalar > > createMemberView (const RTOpPack::SubVectorView< Scalar > &raw_v) const
 
RCP< const VectorBase< Scalar > > createMemberView (const RTOpPack::ConstSubVectorView< Scalar > &raw_v) const
 
RCP< MultiVectorBase< Scalar > > createMembersView (const RTOpPack::SubMultiVectorView< Scalar > &raw_mv) const
 
RCP< const MultiVectorBase
< Scalar > > 
createMembersView (const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv) const
 

Additional Inherited Members

- Public Member Functions inherited from Thyra::VectorSpaceBase< Scalar >
virtual Ordinal dim () const =0
 Return the dimension of the vector space. More...
 
virtual bool isCompatible (const VectorSpaceBase< Scalar > &vecSpc) const =0
 Compare the compatibility of two vector spaces. More...
 
virtual RCP< const
VectorSpaceFactoryBase< Scalar > > 
smallVecSpcFcty () const =0
 Return a VectorSpaceFactoryBase object for the creation of (usually serial) vector spaces with a small dimension. More...
 
virtual Scalar scalarProd (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const =0
 Return the scalar product of two vectors in the vector space. More...
 
void scalarProds (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds_out) const
 Return the scalar product of each column in two multi-vectors in the vector space. More...
 
virtual bool isEuclidean () const
 Return if this vector space has a Euclidean (identity) basis in which case the scalar product is the same as the dot product. More...
 
virtual bool hasInCoreView (const Range1D &rng=Range1D(), const EViewType viewType=VIEW_TYPE_DETACHED, const EStrideType strideType=STRIDE_TYPE_NONUNIT) const
 Returns true if this->acquireDetachedView(rng,...) returns a direct view of the range of data requested. More...
 
virtual RCP< const
VectorSpaceBase< Scalar > > 
clone () const
 Clone this object (if supported). More...
 
- Protected Member Functions inherited from Thyra::VectorSpaceBase< Scalar >
virtual RCP< VectorBase< Scalar > > createMember () const =0
 Create a vector member from the vector space. More...
 
virtual void scalarProdsImpl (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const =0
 

Detailed Description

template<class Scalar>
class Thyra::VectorSpaceDefaultBase< Scalar >

Node VectorSpaceBase subclass that provides default implementations for many functions using a default multi-vectors implementation.

Notes to Subclass Developers

Because of the default multi-vector implementation used in this node subclasses, a concrete subclass is only required to override four functions: dim(), isCompatible(), createMember() and smallVecSpcFcty(). Note that implementing the createMember() method also entails defining a concrete VectorBase subclass and defining smallVecSpcFcty() entails defining a concrete VectorSpaceFactoryBase subclass.

If a subclass can support specialized multi-vectors, then the createMembers() function should be overridden as well. Note that implementing createMembers() also entails defining a concrete MultiVectorBase subclass.

Definition at line 73 of file Thyra_VectorSpaceDefaultBase_decl.hpp.

Member Function Documentation

template<class Scalar >
Teuchos::RCP< MultiVectorBase< Scalar > > Thyra::VectorSpaceDefaultBase< Scalar >::createMembers ( int  numMembers) const
protectedvirtual

The default implementation returns dynamic_cast< DefaultColumnwiseMultiVector<Scalar> >(return.get())!=NULL.

Implements Thyra::VectorSpaceBase< Scalar >.

Reimplemented in Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >, Thyra::DefaultSpmdVectorSpace< Scalar >, and Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 102 of file Thyra_VectorSpaceDefaultBase_def.hpp.

template<class Scalar >
Teuchos::RCP< VectorBase< Scalar > > Thyra::VectorSpaceDefaultBase< Scalar >::createMemberView ( const RTOpPack::SubVectorView< Scalar > &  raw_v) const
protectedvirtual

The default implementation of this function simply calls this->createMember() to create a vector then uses the explicit element access functions to set the elements and then only when the vector is destroyed is the data copied out of the vector and back into the elements pointed to by raw_v.values().

Implements Thyra::VectorSpaceBase< Scalar >.

Reimplemented in Thyra::DefaultSpmdVectorSpace< Scalar >.

Definition at line 114 of file Thyra_VectorSpaceDefaultBase_def.hpp.

template<class Scalar >
Teuchos::RCP< const VectorBase< Scalar > > Thyra::VectorSpaceDefaultBase< Scalar >::createMemberView ( const RTOpPack::ConstSubVectorView< Scalar > &  raw_v) const
protectedvirtual

The default implementation of this function simply calls this->createMember() to create a vector then uses the explicit element access functions to set the elements from raw_v.values().

Implements Thyra::VectorSpaceBase< Scalar >.

Reimplemented in Thyra::DefaultSpmdVectorSpace< Scalar >.

Definition at line 142 of file Thyra_VectorSpaceDefaultBase_def.hpp.

template<class Scalar >
Teuchos::RCP< MultiVectorBase< Scalar > > Thyra::VectorSpaceDefaultBase< Scalar >::createMembersView ( const RTOpPack::SubMultiVectorView< Scalar > &  raw_mv) const
protectedvirtual

The default implementation of this function simply calls this->createMembers(raw_mv.numSubCols()) to create a multi-vector then uses the explicit element access functions to set the elements and then only when the multi-vector is destroyed is the data copied out of the multi-vector and back into the elements pointed to by raw_mv.values().

Implements Thyra::VectorSpaceBase< Scalar >.

Reimplemented in Thyra::DefaultSpmdVectorSpace< Scalar >.

Definition at line 162 of file Thyra_VectorSpaceDefaultBase_def.hpp.

template<class Scalar >
Teuchos::RCP< const MultiVectorBase< Scalar > > Thyra::VectorSpaceDefaultBase< Scalar >::createMembersView ( const RTOpPack::ConstSubMultiVectorView< Scalar > &  raw_mv) const
protectedvirtual

The default implementation of this function simply calls this->createMembers() to create a multi-vector then uses the explicit element access functions to set the elements.

Implements Thyra::VectorSpaceBase< Scalar >.

Reimplemented in Thyra::DefaultSpmdVectorSpace< Scalar >.

Definition at line 191 of file Thyra_VectorSpaceDefaultBase_def.hpp.


The documentation for this class was generated from the following files: