Anasazi::ThyraMultiVec< ScalarType > Class Template Reference

Basic adapter class for Anasazi::MultiVec that uses Thyra::MultiVectorBase<ScalarType>. More...

#include <AnasaziThyraDebugAdapter.hpp>

Inheritance diagram for Anasazi::ThyraMultiVec< ScalarType >:

Anasazi::MultiVec< ScalarType > List of all members.

Public Types

typedef MultiVecTraits< ScalarType,
Thyra::MultiVectorBase< ScalarType > > 
MVT
typedef Teuchos::ScalarTraits<
ScalarType > 
SCT
typedef Teuchos::ScalarTraits<
ScalarType >::magnitudeType 
MagnitudeType
typedef Teuchos::ScalarTraits<
MagnitudeType
MT

Public Member Functions

Constructors/Destructors
 ThyraMultiVec (const Teuchos::RCP< Thyra::MultiVectorBase< ScalarType > > &mv)
 Basic ThyraMultiVec constructor (wraps Thyra::MultiVectorBase<> object).
 ThyraMultiVec (const Teuchos::RCP< Thyra::MultiVectorBase< ScalarType > > &mv, std::vector< Teuchos::RCP< Teuchos::Time > > &timers)
 Basic ThyraMultiVec constructor (wraps Thyra::MultiVectorBase<> object).
 ThyraMultiVec (const ThyraMultiVec< ScalarType > &mv)
 Copy constructor.
virtual ~ThyraMultiVec ()
 Destructor.
Creation methods
MultiVec< ScalarType > * Clone (const int numvecs) const
 Creates a new empty ThyraMultiVec containing numvecs columns.
MultiVec< ScalarType > * CloneCopy () const
 Creates a new ThyraMultiVec and copies contents of *this into the new vector (deep copy).
MultiVec< ScalarType > * CloneCopy (const std::vector< int > &index) const
 Creates a new ThyraMultiVec and copies the selected contents of *this into the new vector (deep copy).
MultiVec< ScalarType > * CloneView (const std::vector< int > &index)
 Creates a new ThyraMultiVec that shares the selected contents of *this.
Attribute methods
int GetNumberVecs () const
 Obtain the vector length of *this.
int GetVecLength () const
 Obtain the number of vectors in *this.
Update methods
void MvTimesMatAddMv (ScalarType alpha, const MultiVec< ScalarType > &A, const Teuchos::SerialDenseMatrix< int, ScalarType > &B, ScalarType beta)
 Update *this with $\alpha AB + \beta (*this)$.
void MvAddMv (ScalarType alpha, const MultiVec< ScalarType > &A, ScalarType beta, const MultiVec< ScalarType > &B)
 Replace *this with $\alpha A + \beta B$.
void MvTransMv (ScalarType alpha, const MultiVec< ScalarType > &A, Teuchos::SerialDenseMatrix< int, ScalarType > &B) const
 Compute a dense matrix B through the matrix-matrix multiply $\alpha A^T(*this)$.
void MvDot (const MultiVec< ScalarType > &A, std::vector< ScalarType > &b) const
 Compute a vector b where the components are the individual dot-products, i.e. $ b[i] = A[i]^H(this[i])$ where A[i] is the i-th column of A.
void MvScale (ScalarType alpha)
 Scale each element of the vectors in *this with alpha.
void MvScale (const std::vector< ScalarType > &alpha)
 Scale each element of the i-th vector in *this with alpha[i].
Norm method
void MvNorm (std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &normvec) const
 Compute the 2-norm of each individual vector of *this. Upon return, normvec[i] holds the 2-norm of the i-th vector of *this.
Initialization methods
void SetBlock (const MultiVec< ScalarType > &A, const std::vector< int > &index)
 Copy the vectors in A to a set of vectors in *this.
void MvRandom ()
 Fill the vectors in *this with random numbers.
void MvInit (ScalarType alpha)
 Replace each element of the vectors in *this with alpha.
Accessor methods
{

Teuchos::RCP< Thyra::MultiVectorBase<
ScalarType > > 
getRCP ()
 Return the reference-counted pointer held by this object.
Teuchos::RCP< const Thyra::MultiVectorBase<
ScalarType > > 
getRCP () const
 Return the const reference-counted pointer held by this object.
std::vector< Teuchos::RCP<
Teuchos::Time > > 
getTimers () const
 Return a std::vector<> of timers held by this object.
void copyTimers (std::vector< Teuchos::RCP< Teuchos::Time > > &timers)
 Copy a std::vector<> of timers into this object.
Print method
void MvPrint (std::ostream &os) const
 Print *this ThyraMultiVec.

Detailed Description

template<class ScalarType>
class Anasazi::ThyraMultiVec< ScalarType >

Basic adapter class for Anasazi::MultiVec that uses Thyra::MultiVectorBase<ScalarType>.

Note:
This adapter is only to be used for debugging purposes. For production use Anasazi::MultiVecTraits templated on Thyra::MultiVectorBase<> and Thyra::LinearOpBase<>.

Definition at line 69 of file AnasaziThyraDebugAdapter.hpp.


Constructor & Destructor Documentation

template<class ScalarType>
Anasazi::ThyraMultiVec< ScalarType >::ThyraMultiVec ( const Teuchos::RCP< Thyra::MultiVectorBase< ScalarType > > &  mv  )  [inline]

Basic ThyraMultiVec constructor (wraps Thyra::MultiVectorBase<> object).

Parameters:
mv [in] a reference-counted pointer to a Thyra::MultiVectorBase<> object.
Returns:
Pointer to a ThyraMultiVec object.

Definition at line 85 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
Anasazi::ThyraMultiVec< ScalarType >::ThyraMultiVec ( const Teuchos::RCP< Thyra::MultiVectorBase< ScalarType > > &  mv,
std::vector< Teuchos::RCP< Teuchos::Time > > &  timers 
) [inline]

Basic ThyraMultiVec constructor (wraps Thyra::MultiVectorBase<> object).

Parameters:
mv [in] a reference-counted pointer to a Thyra::MultiVectorBase<> object.
timers [in] a vector containing timers for this wrapper to use.
Returns:
Pointer to a ThyraMultiVec object.

Definition at line 109 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
Anasazi::ThyraMultiVec< ScalarType >::ThyraMultiVec ( const ThyraMultiVec< ScalarType > &  mv  )  [inline]

Copy constructor.

Parameters:
mv [in] a ThyraMultiVec object.
Returns:
Pointer to a ThyraMultiVec object, where the underlying Thyra::MultiVectorBase<> object has been deep copied.

Definition at line 121 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
virtual Anasazi::ThyraMultiVec< ScalarType >::~ThyraMultiVec (  )  [inline, virtual]

Destructor.

Definition at line 129 of file AnasaziThyraDebugAdapter.hpp.


Member Function Documentation

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::Clone ( const int  numvecs  )  const [inline, virtual]

Creates a new empty ThyraMultiVec containing numvecs columns.

Returns:
Pointer to an ThyraMultiVec

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 140 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::CloneCopy (  )  const [inline, virtual]

Creates a new ThyraMultiVec and copies contents of *this into the new vector (deep copy).

Returns:
Pointer to an ThyraMultiVec

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 151 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::CloneCopy ( const std::vector< int > &  index  )  const [inline, virtual]

Creates a new ThyraMultiVec and copies the selected contents of *this into the new vector (deep copy).

The copied vectors from *this are indicated by the index.size() indices in index.

Returns:
Pointer to an ThyraMultiVec

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 165 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::CloneView ( const std::vector< int > &  index  )  [inline, virtual]

Creates a new ThyraMultiVec that shares the selected contents of *this.

The index of the numvecs vectors shallow copied from *this are indicated by the indices given in index.

Returns:
Pointer to an ThyraMultiVec

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 179 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
int Anasazi::ThyraMultiVec< ScalarType >::GetNumberVecs (  )  const [inline, virtual]

Obtain the vector length of *this.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 192 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
int Anasazi::ThyraMultiVec< ScalarType >::GetVecLength (  )  const [inline, virtual]

Obtain the number of vectors in *this.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 195 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvTimesMatAddMv ( ScalarType  alpha,
const MultiVec< ScalarType > &  A,
const Teuchos::SerialDenseMatrix< int, ScalarType > &  B,
ScalarType  beta 
) [inline, virtual]

Update *this with $\alpha AB + \beta (*this)$.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 203 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvAddMv ( ScalarType  alpha,
const MultiVec< ScalarType > &  A,
ScalarType  beta,
const MultiVec< ScalarType > &  B 
) [inline, virtual]

Replace *this with $\alpha A + \beta B$.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 214 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvTransMv ( ScalarType  alpha,
const MultiVec< ScalarType > &  A,
Teuchos::SerialDenseMatrix< int, ScalarType > &  B 
) const [inline, virtual]

Compute a dense matrix B through the matrix-matrix multiply $\alpha A^T(*this)$.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 225 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvDot ( const MultiVec< ScalarType > &  A,
std::vector< ScalarType > &  b 
) const [inline, virtual]

Compute a vector b where the components are the individual dot-products, i.e. $ b[i] = A[i]^H(this[i])$ where A[i] is the i-th column of A.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 238 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvScale ( ScalarType  alpha  )  [inline, virtual]

Scale each element of the vectors in *this with alpha.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 251 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvScale ( const std::vector< ScalarType > &  alpha  )  [inline, virtual]

Scale each element of the i-th vector in *this with alpha[i].

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 255 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvNorm ( std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  normvec  )  const [inline, virtual]

Compute the 2-norm of each individual vector of *this. Upon return, normvec[i] holds the 2-norm of the i-th vector of *this.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 264 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::SetBlock ( const MultiVec< ScalarType > &  A,
const std::vector< int > &  index 
) [inline, virtual]

Copy the vectors in A to a set of vectors in *this.

The numvecs vectors in A are copied to a subset of vectors in *this indicated by the indices given in index.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 274 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvRandom (  )  [inline, virtual]

Fill the vectors in *this with random numbers.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 283 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvInit ( ScalarType  alpha  )  [inline, virtual]

Replace each element of the vectors in *this with alpha.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 287 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
Teuchos::RCP< Thyra::MultiVectorBase<ScalarType> > Anasazi::ThyraMultiVec< ScalarType >::getRCP (  )  [inline]

Return the reference-counted pointer held by this object.

Definition at line 293 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
Teuchos::RCP< const Thyra::MultiVectorBase<ScalarType> > Anasazi::ThyraMultiVec< ScalarType >::getRCP (  )  const [inline]

Return the const reference-counted pointer held by this object.

Definition at line 297 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
std::vector<Teuchos::RCP<Teuchos::Time> > Anasazi::ThyraMultiVec< ScalarType >::getTimers (  )  const [inline]

Return a std::vector<> of timers held by this object.

Definition at line 301 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::copyTimers ( std::vector< Teuchos::RCP< Teuchos::Time > > &  timers  )  [inline]

Copy a std::vector<> of timers into this object.

Definition at line 321 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvPrint ( std::ostream &  os  )  const [inline, virtual]

Print *this ThyraMultiVec.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 342 of file AnasaziThyraDebugAdapter.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Jul 13 09:22:48 2010 for Anasazi by  doxygen 1.4.7