Thyra::VectorMultiVector< Scalar > Class Template Reference

Generic adapter subclass that takes any MultiVectorBase and turns it into a VectorBase object where columns vectors are stacked on top of one another to make one big vector. More...

#include <Thyra_VectorMultiVectorDecl.hpp>

Inheritance diagram for Thyra::VectorMultiVector< Scalar >:

[legend]
List of all members.

Constructors/initializers/accessors

 VectorMultiVector ()
 Construct uninitialized (see the post-conditions for uninitialize()).
 VectorMultiVector (const Teuchos::RefCountPtr< MultiVectorBase< Scalar > > &mv)
 Calls initialize().
void initialize (const Teuchos::RefCountPtr< MultiVectorBase< Scalar > > &mv)
 Initialize given a MultiVectorBase object.
void uninitialize (Teuchos::RefCountPtr< MultiVectorBase< Scalar > > *mv=NULL)
 Set to uninitialized.
Teuchos::RefCountPtr< MultiVectorBase<
Scalar > > 
mv ()
 Return smart pointer to non-const reference to underlying MultiVectorBase object.
Teuchos::RefCountPtr< const
MultiVectorBase< Scalar > > 
mv () const
 Return smart pointer to const reference to underlying MultiVectorBase object.

Overridden from OpBase (forwarded to this->mv())

Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
range () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
domain () const
 
bool opSupported (ETransp M_trans) const
 

Overridden from LinearOpBase (forwarded to this->mv())

void apply (const ETransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const
 

Overridden from MultiVectorBase (forwarded to this->mv())

Teuchos::RefCountPtr< VectorBase<
Scalar > > 
col (Index j)
 
Teuchos::RefCountPtr< MultiVectorBase<
Scalar > > 
clone_mv () const
 
Teuchos::RefCountPtr< const
MultiVectorBase< Scalar > > 
subView (const Range1D &col_rng) const
 
Teuchos::RefCountPtr< MultiVectorBase<
Scalar > > 
subView (const Range1D &col_rng)
 
Teuchos::RefCountPtr< const
MultiVectorBase< Scalar > > 
subView (const int numCols, const int cols[]) const
 
Teuchos::RefCountPtr< MultiVectorBase<
Scalar > > 
subView (const int numCols, const int cols[])
 
void applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const int num_multi_vecs, const MultiVectorBase< Scalar > *multi_vecs[], const int num_targ_multi_vecs, MultiVectorBase< Scalar > *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[], const Index primary_first_ele, const Index primary_sub_dim, const Index primary_global_offset, const Index secondary_first_ele, const Index secondary_sub_dim) const
 
void applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const int num_multi_vecs, const MultiVectorBase< Scalar > *multi_vecs[], const int num_targ_multi_vecs, MultiVectorBase< Scalar > *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_obj, const Index primary_first_ele, const Index primary_sub_dim, const Index primary_global_offset, const Index secondary_first_ele, const Index secondary_sub_dim) const
 
void getSubMultiVector (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorT< Scalar > *sub_mv) const
 
void freeSubMultiVector (RTOpPack::SubMultiVectorT< Scalar > *sub_mv) const
 
void getSubMultiVector (const Range1D &rowRng, const Range1D &colRng, RTOpPack::MutableSubMultiVectorT< Scalar > *sub_mv)
 
void commitSubMultiVector (RTOpPack::MutableSubMultiVectorT< Scalar > *sub_mv)
 

Overridden from VectorBase (defined in terms of this->mv())

Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
space () const
 
void applyOp (const RTOpPack::RTOpT< Scalar > &op, const int num_vecs, const VectorBase< Scalar > *vecs[], const int num_targ_vecs, VectorBase< Scalar > *targ_vecs[], RTOpPack::ReductTarget *reduct_obj, const Index first_ele, const Index sub_dim, const Index global_offset) const
 
void getSubVector (const Range1D &rng, RTOpPack::SubVectorT< Scalar > *sub_vec) const
 
void freeSubVector (RTOpPack::SubVectorT< Scalar > *sub_vec) const
 
void getSubVector (const Range1D &rng, RTOpPack::MutableSubVectorT< Scalar > *sub_vec)
 
void commitSubVector (RTOpPack::MutableSubVectorT< Scalar > *sub_vec)
 

Detailed Description

template<class Scalar>
class Thyra::VectorMultiVector< Scalar >

Generic adapter subclass that takes any MultiVectorBase and turns it into a VectorBase object where columns vectors are stacked on top of one another to make one big vector.

There are two primary purposes for this concrete subclass. The first purpose of this subclass is to provide an implementation for VectorBase given that a concrete implementation for a MultiVectorBase is already provided. A linear algebra library implementation should have to do almost nothing to get a VectorBase implementation if a MultiVectorBase is already supported. The second purpose of this subclass is to take any MultiVectorBase object with multiple columns and make it look like one big vector.

To use this subclass to provide an implementation for VectorBase, implement the override of the VectorSpaceBase::createMember() function as:

  template<class Scalar>
  Teuchos::RefCountPtr<MultiVectorBase<Scalar> > SomeVectorSpace::createMember()
  {
    return Teuchos::rcp(new VectorMultiVector<Scalar>(this->createMembers(1)));
  }

where SomeVectorSpace::createMembers(int) is overridden to create the multi-vector object.

ToDo: the functionality to support the second and more general use case is not finished yet but can be put together when needed.

Definition at line 70 of file Thyra_VectorMultiVectorDecl.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::VectorMultiVector< Scalar >::VectorMultiVector  ) 
 

Construct uninitialized (see the post-conditions for uninitialize()).

Definition at line 45 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Thyra::VectorMultiVector< Scalar >::VectorMultiVector const Teuchos::RefCountPtr< MultiVectorBase< Scalar > > &  mv  ) 
 

Calls initialize().

Definition at line 49 of file Thyra_VectorMultiVector.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::initialize const Teuchos::RefCountPtr< MultiVectorBase< Scalar > > &  mv  ) 
 

Initialize given a MultiVectorBase object.

Preconditions:

  • mv.get()!=NULL (throw std::invalid_argument)
  • mv->domain().get()!=NULL (throw std::invalid_argument)

Postconditions:

Definition at line 57 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::uninitialize Teuchos::RefCountPtr< MultiVectorBase< Scalar > > *  mv = NULL  ) 
 

Set to uninitialized.

Postconditions:

Definition at line 70 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Teuchos::RefCountPtr< MultiVectorBase< Scalar > > Thyra::VectorMultiVector< Scalar >::mv  )  [inline]
 

Return smart pointer to non-const reference to underlying MultiVectorBase object.

Definition at line 243 of file Thyra_VectorMultiVectorDecl.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const MultiVectorBase< Scalar > > Thyra::VectorMultiVector< Scalar >::mv  )  const [inline]
 

Return smart pointer to const reference to underlying MultiVectorBase object.

Definition at line 251 of file Thyra_VectorMultiVectorDecl.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::VectorMultiVector< Scalar >::range  )  const
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 82 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::VectorMultiVector< Scalar >::domain  )  const
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 89 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
bool Thyra::VectorMultiVector< Scalar >::opSupported ETransp  M_trans  )  const [virtual]
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 95 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::apply const ETransp  M_trans,
const MultiVectorBase< Scalar > &  X,
MultiVectorBase< Scalar > *  Y,
const Scalar  alpha,
const Scalar  beta
const [virtual]
 

Reimplemented from Thyra::SingleRhsLinearOpBase< Scalar >.

Definition at line 103 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Teuchos::RefCountPtr< VectorBase< Scalar > > Thyra::VectorMultiVector< Scalar >::col Index  j  ) 
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 118 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Teuchos::RefCountPtr< MultiVectorBase< Scalar > > Thyra::VectorMultiVector< Scalar >::clone_mv  )  const
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 125 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const MultiVectorBase< Scalar > > Thyra::VectorMultiVector< Scalar >::subView const Range1D col_rng  )  const
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 132 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Teuchos::RefCountPtr< MultiVectorBase< Scalar > > Thyra::VectorMultiVector< Scalar >::subView const Range1D col_rng  ) 
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 139 of file Thyra_VectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 146 of file Thyra_VectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 153 of file Thyra_VectorMultiVector.hpp.

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

Definition at line 159 of file Thyra_VectorMultiVector.hpp.

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

Definition at line 180 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::getSubMultiVector const Range1D rowRng,
const Range1D colRng,
RTOpPack::SubMultiVectorT< Scalar > *  sub_mv
const
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 202 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::freeSubMultiVector RTOpPack::SubMultiVectorT< Scalar > *  sub_mv  )  const
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 212 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::getSubMultiVector const Range1D rowRng,
const Range1D colRng,
RTOpPack::MutableSubMultiVectorT< Scalar > *  sub_mv
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 218 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::commitSubMultiVector RTOpPack::MutableSubMultiVectorT< Scalar > *  sub_mv  ) 
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 228 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::VectorMultiVector< Scalar >::space  )  const
 

Definition at line 237 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::applyOp const RTOpPack::RTOpT< Scalar > &  op,
const int  num_vecs,
const VectorBase< Scalar > *  vecs[],
const int  num_targ_vecs,
VectorBase< Scalar > *  targ_vecs[],
RTOpPack::ReductTarget reduct_obj,
const Index  first_ele,
const Index  sub_dim,
const Index  global_offset
const
 

Definition at line 246 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::getSubVector const Range1D rng,
RTOpPack::SubVectorT< Scalar > *  sub_vec
const
 

Definition at line 286 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::freeSubVector RTOpPack::SubVectorT< Scalar > *  sub_vec  )  const
 

Definition at line 300 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::getSubVector const Range1D rng,
RTOpPack::MutableSubVectorT< Scalar > *  sub_vec
 

Definition at line 314 of file Thyra_VectorMultiVector.hpp.

template<class Scalar>
void Thyra::VectorMultiVector< Scalar >::commitSubVector RTOpPack::MutableSubVectorT< Scalar > *  sub_vec  ) 
 

Definition at line 328 of file Thyra_VectorMultiVector.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:39:54 2008 for Thyra ANA Operator/VectorBase Interfaces and Related Software by doxygen 1.3.9.1