Thyra
Version of the Day
|
#include <Thyra_BlockedLinearOpBase.hpp>
Public Member Functions | |
virtual int | numBlocks () const =0 |
Returns the number of blocks that make up this product space. More... | |
virtual Teuchos::RCP< const VectorSpaceBase< Scalar > > | getBlock (const int k) const =0 |
Returns a vector space for the kth (zero-based) block. More... | |
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, bool initialize=true) 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... | |
Related Functions | |
(Note that these are not member functions.) | |
template<class Scalar > | |
RCP< ProductVectorSpaceBase < Scalar > > | nonconstProductVectorSpaceBase (const RCP< VectorSpaceBase< Scalar > > &v, const bool forceSuccess=true) |
Dynamic cast from a VectorSpaceBase to a ProductVectorSpaceBase object and thow exception if this fails. More... | |
template<class Scalar > | |
RCP< const ProductVectorSpaceBase< Scalar > > | productVectorSpaceBase (const RCP< const VectorSpaceBase< Scalar > > &v, const bool forceSuccess=true) |
Dynamic cast from a const VectorSpaceBase to a const ProductVectorSpaceBase object and thow exception if this fails. More... | |
RCP< ProductVectorSpaceBase < double > > | nonconstProductVectorSpaceBase (const RCP< VectorSpaceBase< double > > &vs, const bool forceSuccess=true) |
Inline overload of nonconstProductVectorSpaceBase<Scalar>(..) for double. More... | |
RCP< const ProductVectorSpaceBase< double > > | productVectorSpaceBase (const RCP< const VectorSpaceBase< double > > &vs, const bool forceSuccess=true) |
Inline overload of productVectorSpaceBase<Scalar>(..) for double. More... | |
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... | |
Base interface for product vector spaces.
This class defines an abstract interface for a vector space that is built out of the one or more other vector spaces to form what mathematicians like to call a "product space".
For example, one can think of a product space as the concatenation of one or more vector spaces V[k]
where k=0,...,numBlocks-1
. A product space Z
would then be represented as:
[ V[0] ] Z = [ V[1] ] [ . ] [ V[numBlocks-1] ]
The total number of constituent vector spaces is returned by the numBlocks()
function. Smart pointers to the constituent vector space blocks themselves are returned using the getBlock()
function.
The vectors created by this->createMember()
(which is inherited from the VectorSpaceBase
interface) must support the ProductVectorBase
interface (i.e. dynamic_cast<ProductVectorBase<Scalar>*>(&*this->createMember()) != NULL
). Likewise, the multi-vectors created by this->createMembers()
must support the ProductMultiVectorBase
interface (i.e. dynamic_cast<ProductMultiVectorBase<Scalar>*>(&*this->createMember()) != NULL
)
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 DefaultProductVectorSpace
.
Definition at line 21 of file Thyra_BlockedLinearOpBase.hpp.
|
pure virtual |
Returns the number of blocks that make up this product space.
Preconditions:
this->dim() > 0
. Implemented in Thyra::DefaultProductVectorSpace< Scalar >, Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >, and Thyra::DefaultMultiVectorProductVectorSpace< Scalar >.
|
pure virtual |
Returns a vector space for the kth
(zero-based) block.
Preconditions:
0 <= k <= numBlocks()-1
Implemented in Thyra::DefaultProductVectorSpace< Scalar >, Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >, and Thyra::DefaultMultiVectorProductVectorSpace< Scalar >.
|
related |
Dynamic cast from a VectorSpaceBase
to a ProductVectorSpaceBase
object and thow exception if this fails.
Definition at line 104 of file Thyra_ProductVectorSpaceBase.hpp.
|
related |
Dynamic cast from a const VectorSpaceBase
to a const ProductVectorSpaceBase
object and thow exception if this fails.
Definition at line 122 of file Thyra_ProductVectorSpaceBase.hpp.
|
related |
Inline overload of nonconstProductVectorSpaceBase<Scalar>(..) for double.
Definition at line 139 of file Thyra_ProductVectorSpaceBase.hpp.
|
related |
Inline overload of productVectorSpaceBase<Scalar>(..) for double.
Definition at line 154 of file Thyra_ProductVectorSpaceBase.hpp.