Thyra::DefaultVectorMultiVector< 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_DefaultVectorMultiVectorDecl.hpp>

Inheritance diagram for Thyra::DefaultVectorMultiVector< Scalar >:

[legend]
List of all members.

Constructors/initializers/accessors



 DefaultVectorMultiVector ()
 Construct uninitialized (see the post-conditions for uninitialize()).
 DefaultVectorMultiVector (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 LinearOpBase (forwarded to this->mv())

Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
range () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
domain () const
 
bool opSupported (ETransp M_trans) const
 
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 acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
 
void releaseDetachedView (RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
 
void acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
 
void commitDetachedView (RTOpPack::SubMultiVectorView< 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 acquireDetachedView (const Range1D &rng, RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const
 
void releaseDetachedView (RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const
 
void acquireDetachedView (const Range1D &rng, RTOpPack::SubVectorView< Scalar > *sub_vec)
 
void commitDetachedView (RTOpPack::SubVectorView< Scalar > *sub_vec)
 

Detailed Description

template<class Scalar>
class Thyra::DefaultVectorMultiVector< 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 DefaultVectorMultiVector<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_DefaultVectorMultiVectorDecl.hpp.


Constructor & Destructor Documentation

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

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

Definition at line 45 of file Thyra_DefaultVectorMultiVector.hpp.

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

Calls initialize().

Definition at line 49 of file Thyra_DefaultVectorMultiVector.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::DefaultVectorMultiVector< 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_DefaultVectorMultiVector.hpp.

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

Set to uninitialized.

Postconditions:

Definition at line 70 of file Thyra_DefaultVectorMultiVector.hpp.

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

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

Definition at line 239 of file Thyra_DefaultVectorMultiVectorDecl.hpp.

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

Return smart pointer to const reference to underlying MultiVectorBase object.

Definition at line 247 of file Thyra_DefaultVectorMultiVectorDecl.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 82 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 89 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 95 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< 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 101 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 116 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 123 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 130 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 137 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 144 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 151 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< 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 [virtual]
 

Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.

Definition at line 157 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< 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 [virtual]
 

Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.

Definition at line 178 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 200 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 210 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 216 of file Thyra_DefaultVectorMultiVector.hpp.

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

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 226 of file Thyra_DefaultVectorMultiVector.hpp.

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

Definition at line 235 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< 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 244 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< Scalar >::acquireDetachedView const Range1D rng,
RTOpPack::ConstSubVectorView< Scalar > *  sub_vec
const [virtual]
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 284 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< Scalar >::releaseDetachedView RTOpPack::ConstSubVectorView< Scalar > *  sub_vec  )  const [virtual]
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 298 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< Scalar >::acquireDetachedView const Range1D rng,
RTOpPack::SubVectorView< Scalar > *  sub_vec
[virtual]
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 312 of file Thyra_DefaultVectorMultiVector.hpp.

template<class Scalar>
void Thyra::DefaultVectorMultiVector< Scalar >::commitDetachedView RTOpPack::SubVectorView< Scalar > *  sub_vec  )  [virtual]
 

Reimplemented from Thyra::VectorDefaultBase< Scalar >.

Definition at line 326 of file Thyra_DefaultVectorMultiVector.hpp.


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