Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Thyra::ProductMultiVectorBase< Scalar > Class Template Referenceabstract

Base interface for product multi-vectors. More...

#include <Thyra_ProductMultiVectorBase.hpp>

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

Public Member Functions

virtual Teuchos::RCP< const
ProductVectorSpaceBase< Scalar > > 
productSpace () const =0
 Returns the associated product vector space that represents the range. More...
 
virtual bool blockIsConst (const int k) const =0
 Return if the kth multi-vector block is const-only. More...
 
virtual Teuchos::RCP
< MultiVectorBase< Scalar > > 
getNonconstMultiVectorBlock (const int k)=0
 Returns a non-persisting non-const view of the zero-based kth block multi-vector. More...
 
virtual Teuchos::RCP< const
MultiVectorBase< Scalar > > 
getMultiVectorBlock (const int k) const =0
 Returns a non-persisting const view of the (zero-based) kth block multi-vector. More...
 
- Public Member Functions inherited from Thyra::MultiVectorBase< Scalar >
void assign (Scalar alpha)
 V = alpha. More...
 
void assign (const MultiVectorBase< Scalar > &mv)
 V = mv. More...
 
void scale (Scalar alpha)
 
void update (Scalar alpha, const MultiVectorBase< Scalar > &mv)
 
void linear_combination (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta)
 Y.col(j)(i) = beta*Y.col(j)(i) + sum( alpha[k]*X[k].col(j)(i), More...
 
void dots (const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const
 Column-wise Euclidean dot product. More...
 
void norms_1 (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
 Column-wise 1-norms. More...
 
void norms_2 (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
 Column-wise 2-norms. More...
 
void norms_inf (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
 Column-wise infinity-norms. More...
 
RCP< const VectorBase< Scalar > > col (Ordinal j) const
 Calls colImpl(). More...
 
RCP< VectorBase< Scalar > > col (Ordinal j)
 Calls nonconstColImpl(). More...
 
RCP< const MultiVectorBase
< Scalar > > 
subView (const Range1D &colRng) const
 Calls contigSubViewImpl(). More...
 
RCP< MultiVectorBase< Scalar > > subView (const Range1D &colRng)
 Calls nonconstContigSubViewImpl(). More...
 
RCP< const MultiVectorBase
< Scalar > > 
subView (const ArrayView< const int > &cols) const
 nonContigSubViewImpl(). More...
 
RCP< MultiVectorBase< Scalar > > subView (const ArrayView< const int > &cols)
 nonconstNonContigSubViewImpl(). More...
 
void applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const ArrayView< const Ptr< RTOpPack::ReductTarget > > &reduct_objs, const Ordinal primary_global_offset) const
 Calls mvMultiReductApplyOpImpl(). More...
 
void applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset) const
 mvSingleReductApplyOpImpl(). More...
 
void acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
 Calls acquireDetachedMultiVectorViewImpl(). More...
 
void releaseDetachedView (RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
 Calls releaseDetachedMultiVectorViewImpl(). More...
 
void acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
 Calls acquireNonconstDetachedMultiVectorViewImpl(). More...
 
void commitDetachedView (RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
 Calls commitNonconstDetachedMultiVectorViewImpl(). More...
 
virtual RCP< MultiVectorBase
< Scalar > > 
clone_mv () const =0
 Clone the multi-vector object (if supported). More...
 
RCP< const LinearOpBase< Scalar > > clone () const
 This function is simply overridden to return this->clone_mv(). More...
 
- Public Member Functions inherited from Thyra::LinearOpBase< Scalar >
virtual RCP< const
VectorSpaceBase< Scalar > > 
range () const =0
 Return a smart pointer for the range space for this operator. More...
 
virtual RCP< const
VectorSpaceBase< Scalar > > 
domain () const =0
 Return a smart pointer for the domain space for this operator. More...
 
bool opSupported (EOpTransp M_trans) const
 Return if the M_trans operation of apply() is supported or not. More...
 
void apply (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
 Apply the linear operator to a multi-vector : Y = alpha*op(M)*X + beta*Y. More...
 
- Public Member Functions inherited from Thyra::RowStatLinearOpBase< Scalar >
bool rowStatIsSupported (const RowStatLinearOpBaseUtils::ERowStat rowStat) const
 Determine if a given row stat is supported. More...
 
void getRowStat (const RowStatLinearOpBaseUtils::ERowStat rowStat, const Ptr< VectorBase< Scalar > > &rowStatVec) const
 Get some statistics about a supported row. More...
 
- Public Member Functions inherited from Thyra::ScaledLinearOpBase< Scalar >
bool supportsScaleLeft () const
 Determines if this objects supports left scaling. More...
 
bool supportsScaleRight () const
 Determines if this objects supports right scaling. More...
 
void scaleLeft (const VectorBase< Scalar > &row_scaling)
 Left scales operator with diagonal scaling operator. More...
 
void scaleRight (const VectorBase< Scalar > &col_scaling)
 Right scales operator with diagonal scaling operator. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Thyra::MultiVectorBase< Scalar >
void absRowSum (const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const
 
void absColSum (const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const
 
virtual void assignImpl (Scalar alpha)=0
 Virtual implementation for NVI assign(Scalar). More...
 
virtual void assignMultiVecImpl (const MultiVectorBase< Scalar > &mv)=0
 Virtual implementation for NVI assign(MV). More...
 
virtual void scaleImpl (Scalar alpha)=0
 Virtual implementation for NVI scale(). More...
 
virtual void updateImpl (Scalar alpha, const MultiVectorBase< Scalar > &mv)=0
 Virtual implementation for NVI update(). More...
 
virtual void linearCombinationImpl (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta)=0
 Virtual implementation for NVI linear_combination(). More...
 
virtual void dotsImpl (const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const =0
 Virtual implementation for NVI dots(). More...
 
virtual void norms1Impl (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0
 Virtual implementation for NVI norms_1(). More...
 
virtual void norms2Impl (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0
 Virtual implementation for NVI norms_2(). More...
 
virtual void normsInfImpl (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0
 Virtual implementation for NVI norms_inf(). More...
 
virtual RCP< const VectorBase
< Scalar > > 
colImpl (Ordinal j) const
 Return a non-changeable view of a constituent column vector. More...
 
virtual RCP< VectorBase< Scalar > > nonconstColImpl (Ordinal j)=0
 Return a changeable view of a constituent column vector. More...
 
virtual RCP< const
MultiVectorBase< Scalar > > 
contigSubViewImpl (const Range1D &colRng) const =0
 Return a non-changeable sub-view of a contiguous set of columns of the this multi-vector. More...
 
virtual RCP< MultiVectorBase
< Scalar > > 
nonconstContigSubViewImpl (const Range1D &colRng)=0
 Return a changeable sub-view of a contiguous set of columns of the this multi-vector. More...
 
virtual RCP< const
MultiVectorBase< Scalar > > 
nonContigSubViewImpl (const ArrayView< const int > &cols) const =0
 Return a non-changeable sub-view of a non-contiguous set of columns of this multi-vector. More...
 
virtual RCP< MultiVectorBase
< Scalar > > 
nonconstNonContigSubViewImpl (const ArrayView< const int > &cols)=0
 Return a changeable sub-view of a non-contiguous set of columns of this multi-vector. More...
 
virtual void mvMultiReductApplyOpImpl (const RTOpPack::RTOpT< Scalar > &primary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const ArrayView< const Ptr< RTOpPack::ReductTarget > > &reduct_objs, const Ordinal primary_global_offset) const =0
 Apply a reduction/transformation operator column by column and return an array of the reduction objects. More...
 
virtual void mvSingleReductApplyOpImpl (const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset) const =0
 Apply a reduction/transformation operator column by column and reduce the intermediate reduction objects into a single reduction object. More...
 
virtual void acquireDetachedMultiVectorViewImpl (const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const =0
 Get a non-changeable explicit view of a sub-multi-vector. More...
 
virtual void releaseDetachedMultiVectorViewImpl (RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const =0
 Free a non-changeable explicit view of a sub-multi-vector. More...
 
virtual void acquireNonconstDetachedMultiVectorViewImpl (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)=0
 Get a changeable explicit view of a sub-multi-vector. More...
 
virtual void commitNonconstDetachedMultiVectorViewImpl (RTOpPack::SubMultiVectorView< Scalar > *sub_mv)=0
 Commit changes for a changeable explicit view of a sub-multi-vector. More...
 
virtual bool rowStatIsSupportedImpl (const RowStatLinearOpBaseUtils::ERowStat rowStat) const
 
virtual void getRowStatImpl (const RowStatLinearOpBaseUtils::ERowStat rowStat, const Ptr< VectorBase< Scalar > > &rowStatVec) const
 
virtual bool supportsScaleLeftImpl () const
 
virtual bool supportsScaleRightImpl () const
 
virtual void scaleLeftImpl (const VectorBase< Scalar > &row_scaling)
 
virtual void scaleRightImpl (const VectorBase< Scalar > &col_scaling)
 
- Protected Member Functions inherited from Thyra::LinearOpBase< Scalar >
virtual bool opSupportedImpl (EOpTransp M_trans) const =0
 Override in subclass. More...
 
virtual void applyImpl (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const =0
 Override in subclass. More...
 
- Protected Member Functions inherited from Thyra::RowStatLinearOpBase< Scalar >
- Protected Member Functions inherited from Thyra::ScaledLinearOpBase< Scalar >

Detailed Description

template<class Scalar>
class Thyra::ProductMultiVectorBase< Scalar >

Base interface for product multi-vectors.

This class defines an abstract interface for a multi-vector that is built out of the one or more other multi-vectors to form a product multi-vector. 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 DefaultProductMultiVector.

ToDo: Finish documentation!

Definition at line 66 of file Thyra_ProductMultiVectorBase.hpp.

Member Function Documentation

template<class Scalar>
virtual Teuchos::RCP<const ProductVectorSpaceBase<Scalar> > Thyra::ProductMultiVectorBase< Scalar >::productSpace ( ) const
pure virtual

Returns the associated product vector space that represents the range.

If *this is uninitialized then return.get()==NULL.

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

template<class Scalar>
virtual bool Thyra::ProductMultiVectorBase< Scalar >::blockIsConst ( const int  k) const
pure virtual

Return if the kth multi-vector block is const-only.

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

Preconditions:

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

template<class Scalar>
virtual Teuchos::RCP<MultiVectorBase<Scalar> > Thyra::ProductMultiVectorBase< Scalar >::getNonconstMultiVectorBlock ( const int  k)
pure virtual

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

Parameters
k[in] The (zero-based) kth block index specifying which multi-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::DefaultProductVector< Scalar >, Thyra::DefaultMultiVectorProductVector< Scalar >, Thyra::DefaultProductMultiVector< Scalar >, and Thyra::DefaultClusteredSpmdProductVector< Scalar >.

template<class Scalar>
virtual Teuchos::RCP<const MultiVectorBase<Scalar> > Thyra::ProductMultiVectorBase< Scalar >::getMultiVectorBlock ( const int  k) const
pure virtual

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

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

Preconditions:

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


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