Thyra::MultiVectorDefaultBase< Scalar > Class Template Reference
[Development of linear Abstract Numerical Algorithms (ANAs)]

Node subclass that uses a default MultiVectorBase implementation to provide default implementations for as many other functions in MultiVectorBase interface the as is reasonable. More...

#include <Thyra_MultiVectorDefaultBaseDecl.hpp>

Inheritance diagram for Thyra::MultiVectorDefaultBase< Scalar >:

[legend]
List of all members.

Overridden public member functions from MultiVectorBase

Teuchos::RefCountPtr< const
MultiVectorBase< Scalar > > 
subView (const Range1D &colRng) const
 
Teuchos::RefCountPtr< MultiVectorBase<
Scalar > > 
subView (const Range1D &colRng)
 
Teuchos::RefCountPtr< const
MultiVectorBase< Scalar > > 
subView (const int numCols, const int cols[]) const
 
Teuchos::RefCountPtr< MultiVectorBase<
Scalar > > 
subView (const int numCols, const int cols[])
 
virtual void applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const int num_multi_vecs, const MultiVectorBase< Scalar > *const multi_vecs[], const int num_targ_multi_vecs, MultiVectorBase< Scalar > *const targ_multi_vecs[], RTOpPack::ReductTarget *const reduct_objs[], const Index primary_first_ele_offset, const Index primary_sub_dim, const Index primary_global_offset, const Index secondary_first_ele_offset, const Index secondary_sub_dim) const
 
virtual void applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const int num_multi_vecs, const MultiVectorBase< Scalar > *const multi_vecs[], const int num_targ_multi_vecs, MultiVectorBase< Scalar > *const targ_multi_vecs[], RTOpPack::ReductTarget *reduct_obj, const Index primary_first_ele_offset, const Index primary_sub_dim, const Index primary_global_offset, const Index secondary_first_ele_offset, const Index secondary_sub_dim) const
 
virtual void acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
 
virtual void releaseDetachedView (RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
 
virtual void acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
 
virtual void commitDetachedView (RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
 
virtual Teuchos::RefCountPtr<
MultiVectorBase< Scalar > > 
clone_mv () const
 

Detailed Description

template<class Scalar>
class Thyra::MultiVectorDefaultBase< Scalar >

Node subclass that uses a default MultiVectorBase implementation to provide default implementations for as many other functions in MultiVectorBase interface the as is reasonable.

Notes to subclass developers

Only three function overrides are required in order to create a concrete MultiVectorBase subclass: range(), domain() and the non-const version of col(). All of the other functions have default implementations. However, a good implementation will provide optimized overrides of at least the functions apply() and applyTranspose(). The non-const versions of subView() should be overridden if subviews are important. The default implementation will not achieve near-optimal performance in many cases.

Definition at line 55 of file Thyra_MultiVectorDefaultBaseDecl.hpp.


Member Function Documentation

template<class Scalar>
Teuchos::RefCountPtr< const MultiVectorBase< Scalar > > Thyra::MultiVectorDefaultBase< Scalar >::subView const Range1D colRng  )  const
 

Reimplemented in Thyra::VectorDefaultBase< Scalar >, and Thyra::DefaultVectorMultiVector< Scalar >.

Definition at line 308 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< MultiVectorBase< Scalar > > Thyra::MultiVectorDefaultBase< Scalar >::subView const Range1D colRng  ) 
 

Reimplemented in Thyra::VectorDefaultBase< Scalar >, Thyra::DefaultColumnwiseMultiVector< Scalar >, Thyra::DefaultSpmdMultiVector< Scalar >, and Thyra::DefaultVectorMultiVector< Scalar >.

Definition at line 330 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const MultiVectorBase< Scalar > > Thyra::MultiVectorDefaultBase< Scalar >::subView const int  numCols,
const int  cols[]
const
 

Reimplemented in Thyra::VectorDefaultBase< Scalar >, Thyra::DefaultSpmdMultiVector< Scalar >, and Thyra::DefaultVectorMultiVector< Scalar >.

Definition at line 352 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< MultiVectorBase< Scalar > > Thyra::MultiVectorDefaultBase< Scalar >::subView const int  numCols,
const int  cols[]
 

Reimplemented in Thyra::VectorDefaultBase< Scalar >, Thyra::DefaultSpmdMultiVector< Scalar >, and Thyra::DefaultVectorMultiVector< Scalar >.

Definition at line 380 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
void Thyra::MultiVectorDefaultBase< Scalar >::applyOp const RTOpPack::RTOpT< Scalar > &  primary_op,
const int  num_multi_vecs,
const MultiVectorBase< Scalar > *const   multi_vecs[],
const int  num_targ_multi_vecs,
MultiVectorBase< Scalar > *const   targ_multi_vecs[],
RTOpPack::ReductTarget *const   reduct_objs[],
const Index  primary_first_ele_offset,
const Index  primary_sub_dim,
const Index  primary_global_offset,
const Index  secondary_first_ele_offset,
const Index  secondary_sub_dim
const [virtual]
 

This implementation calls VectorBase::applyOp() on each column this->col(j) for j = 0 ... this->range()->dim()-1.

Reimplemented in Thyra::DefaultVectorMultiVector< Scalar >, and Thyra::SpmdMultiVectorBase< Scalar >.

Definition at line 63 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
void Thyra::MultiVectorDefaultBase< Scalar >::applyOp const RTOpPack::RTOpT< Scalar > &  primary_op,
const RTOpPack::RTOpT< Scalar > &  secondary_op,
const int  num_multi_vecs,
const MultiVectorBase< Scalar > *const   multi_vecs[],
const int  num_targ_multi_vecs,
MultiVectorBase< Scalar > *const   targ_multi_vecs[],
RTOpPack::ReductTarget reduct_obj,
const Index  primary_first_ele_offset,
const Index  primary_sub_dim,
const Index  primary_global_offset,
const Index  secondary_first_ele_offset,
const Index  secondary_sub_dim
const [virtual]
 

This implementation calls applyOp() where an array of reduction objects is taken.

Reimplemented in Thyra::DefaultVectorMultiVector< Scalar >.

Definition at line 132 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
void Thyra::MultiVectorDefaultBase< Scalar >::acquireDetachedView const Range1D rowRng,
const Range1D colRng,
RTOpPack::ConstSubMultiVectorView< Scalar > *  sub_mv
const [virtual]
 

This implementation is based on the vector operation VectorBase::acquireDetachedView() called on the non-changeable vector objects returned from col(). Note that the footprint of the reduction object (both internal and external state) will be O(rowRng.size()*colRng.size()). For serial applications this is fairly reasonable and will not be a major performance penalty. For parallel applications, however, this is a terrible implementation and must be overridden if rowRng.size() is large at all. Although, this function should not even be used in cases where the multi-vector is very large. If a subclass does override this function, it must also override releaseDetachedView() which has an implementation which is a companion to this function's implementation.

Reimplemented in Thyra::VectorDefaultBase< Scalar >, Thyra::DefaultVectorMultiVector< Scalar >, and Thyra::SpmdMultiVectorBase< Scalar >.

Definition at line 201 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
void Thyra::MultiVectorDefaultBase< Scalar >::releaseDetachedView RTOpPack::ConstSubMultiVectorView< Scalar > *  sub_mv  )  const [virtual]
 

This implementation is a companion to the implementation for acquireDetachedView(). If acquireDetachedView() is overridden by a subclass then this function must be overridden also!

Reimplemented in Thyra::VectorDefaultBase< Scalar >, Thyra::DefaultVectorMultiVector< Scalar >, and Thyra::SpmdMultiVectorBase< Scalar >.

Definition at line 250 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
void Thyra::MultiVectorDefaultBase< Scalar >::acquireDetachedView const Range1D rowRng,
const Range1D colRng,
RTOpPack::SubMultiVectorView< Scalar > *  sub_mv
[virtual]
 

This implementation is based on the vector operation VectorBase::acquireDetachedView() called on the changeable vector objects returned from col(). Note that the footprint of the reduction object (both internal and external state) will be O(rowRng.size()*colRng.size()). For serial applications this is fairly reasonable and will not be a major performance penalty. For parallel applications, however, this is a terrible implementation and must be overridden if rowRng.size() is large at all. Although, this function should not even be used in case where the multi-vector is very large. If a subclass does override this function, it must also override commitDetachedView() which has an implementation which is a companion to this function's implementation.

Reimplemented in Thyra::VectorDefaultBase< Scalar >, Thyra::DefaultVectorMultiVector< Scalar >, and Thyra::SpmdMultiVectorBase< Scalar >.

Definition at line 260 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
void Thyra::MultiVectorDefaultBase< Scalar >::commitDetachedView RTOpPack::SubMultiVectorView< Scalar > *  sub_mv  )  [virtual]
 

This implementation is a companion to the default implementation for acquireDetachedView(). If acquireDetachedView() is overridden by a subclass then this function must be overridden also!

Reimplemented in Thyra::VectorDefaultBase< Scalar >, Thyra::DefaultVectorMultiVector< Scalar >, and Thyra::SpmdMultiVectorBase< Scalar >.

Definition at line 279 of file Thyra_MultiVectorDefaultBase.hpp.

template<class Scalar>
Teuchos::RefCountPtr< MultiVectorBase< Scalar > > Thyra::MultiVectorDefaultBase< Scalar >::clone_mv  )  const [virtual]
 

This implementation uses the vector space to create a new multi-vector object and then uses a transformation operator to assign the vector elements. A subclass should only override this function if it can do something more sophisticated (i.e. lazy evaluation) but in general, this is not needed.

Reimplemented in Thyra::VectorDefaultBase< Scalar >, and Thyra::DefaultVectorMultiVector< Scalar >.

Definition at line 49 of file Thyra_MultiVectorDefaultBase.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:32:33 2008 for Thyra Operator/Vector Support by doxygen 1.3.9.1