Thyra
Version of the Day
|
Node VectorSpaceBase
subclass that provides default implementations for many functions using a default multi-vectors implementation.
More...
#include <Thyra_VectorSpaceDefaultBase_decl.hpp>
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... | |
virtual RCP< MultiVectorBase < Scalar > > | createCachedMembersView (const RTOpPack::SubMultiVectorView< Scalar > &raw_mv) const |
Create a (possibly) cached multi-vector member that is a non-const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView . More... | |
virtual RCP< const MultiVectorBase< Scalar > > | createCachedMembersView (const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv) const |
Create a (possibly) cached multi-vector member that is a const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView . 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 |
Related Functions inherited from Thyra::VectorSpaceBase< Scalar > | |
template<class Scalar > | |
RCP< const VectorSpaceBase < Scalar > > | makeHaveOwnership (const RCP< const VectorSpaceBase< Scalar > > &vs) |
Helper function that clones a VectorSpaceBase object if the RCP does not have ownership. More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMember (const RCP< const VectorSpaceBase< Scalar > > &vs, const std::string &label="") |
Create a vector member from the vector space. More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMember (const VectorSpaceBase< Scalar > &vs, const std::string &label="") |
Calls createMember(Teuchos::rcp(&vs,false)) . More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembers (const RCP< const VectorSpaceBase< Scalar > > &vs, int numMembers, const std::string &label="") |
Create a set of vector members (a MultiVectorBase ) from the vector space. More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembers (const RCP< const VectorSpaceBase< Scalar > > &vs, const RCP< const VectorSpaceBase< Scalar > > &domain, const std::string &label="") |
Create a set of vector members (a MultiVectorBase ) from the vector space. More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembers (const VectorSpaceBase< Scalar > &vs, int numMembers, const std::string &label="") |
Calls createMembers(Teuchos::rcp(&vs,false),numMembers) . More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMemberView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::SubVectorView< Scalar > &raw_v, const std::string &label="") |
Create a vector member that is a non-const view of raw data. More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMemberView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::SubVectorView< Scalar > &raw_v, const std::string &label="") |
Calls createMemberView(Teuchos::rcp(&vs,false),raw_v) . More... | |
template<class Scalar > | |
RCP< const VectorBase< Scalar > > | createMemberView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::ConstSubVectorView< Scalar > &raw_v, const std::string &label="") |
Create a vector member that is a const view of raw data. More... | |
template<class Scalar > | |
RCP< const VectorBase< Scalar > > | createMemberView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::ConstSubVectorView< Scalar > &raw_v, const std::string &label="") |
Calls createMemberView(Teuchos::rcp(&vs,false),raw_v) . More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembersView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::SubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Create a multi-vector member that is a non-const view of raw data. More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembersView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::SubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Calls createMembersView(Teuchos::rcp(&vs,false),raw_mv) . More... | |
template<class Scalar > | |
RCP< const MultiVectorBase < Scalar > > | createMembersView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Create a multi-vector member that is a const view of raw data. More... | |
template<class Scalar > | |
RCP< const MultiVectorBase < Scalar > > | createMembersView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Calls createMembersView(Teuchos::rcp(&vs,false),raw_mv) . More... | |
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.
|
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.
|
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.
|
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.
|
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.
|
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.