Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members
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 >

Public Member Functions

Constructors/Destructors
 ThyraMultiVec (const Teuchos::RCP< Thyra::MultiVectorBase< ScalarType > > &mv)
 Basic ThyraMultiVec constructor (wraps Thyra::MultiVectorBase<> object). More...
 
 ThyraMultiVec (const Teuchos::RCP< Thyra::MultiVectorBase< ScalarType > > &mv, std::vector< Teuchos::RCP< Teuchos::Time > > &timers)
 Basic ThyraMultiVec constructor (wraps Thyra::MultiVectorBase<> object). More...
 
 ThyraMultiVec (const ThyraMultiVec< ScalarType > &mv)
 Copy constructor. More...
 
virtual ~ThyraMultiVec ()
 Destructor. More...
 
Creation methods
MultiVec< ScalarType > * Clone (const int numvecs) const
 Creates a new empty ThyraMultiVec containing numvecs columns. More...
 
MultiVec< ScalarType > * CloneCopy () const
 Creates a new ThyraMultiVec and copies contents of *this into the new vector (deep copy). More...
 
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). More...
 
MultiVec< ScalarType > * CloneViewNonConst (const std::vector< int > &index)
 Creates a new ThyraMultiVec that shares the selected contents of *this. More...
 
const MultiVec< ScalarType > * CloneView (const std::vector< int > &index) const
 Creates a new ThyraMultiVec that shares the selected contents of *this. More...
 
Attribute methods
int GetNumberVecs () const
 Obtain the vector length of *this. More...
 
ptrdiff_t GetGlobalLength () const
 Obtain the number of vectors in *this. More...
 
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)$. More...
 
void MvAddMv (ScalarType alpha, const MultiVec< ScalarType > &A, ScalarType beta, const MultiVec< ScalarType > &B)
 Replace *this with $\alpha A + \beta B$. More...
 
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)$. More...
 
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. More...
 
void MvScale (ScalarType alpha)
 Scale each element of the vectors in *this with alpha. More...
 
void MvScale (const std::vector< ScalarType > &alpha)
 Scale each element of the i-th vector in *this with alpha[i]. More...
 
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. More...
 
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. More...
 
void MvRandom ()
 Fill the vectors in *this with random numbers. More...
 
void MvInit (ScalarType alpha)
 Replace each element of the vectors in *this with alpha. More...
 
Accessor methods

{

Teuchos::RCP
< Thyra::MultiVectorBase
< ScalarType > > 
getRCP ()
 Return the reference-counted pointer held by this object. More...
 
Teuchos::RCP< const
Thyra::MultiVectorBase
< ScalarType > > 
getRCP () const
 Return the const reference-counted pointer held by this object. More...
 
std::vector< Teuchos::RCP
< Teuchos::Time > > 
getTimers () const
 Return a std::vector<> of timers held by this object. More...
 
void copyTimers (const std::vector< Teuchos::RCP< Teuchos::Time > > &timers)
 Copy a std::vector<> of timers into this object. More...
 
Print method
void MvPrint (std::ostream &os) const
 Print *this ThyraMultiVec. More...
 
- Public Member Functions inherited from Anasazi::MultiVec< ScalarType >
 MultiVec ()
 Default constructor. More...
 
virtual ~MultiVec ()
 Destructor (virtual for memory safety of derived classes). More...
 

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 50 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 66 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 90 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 102 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
virtual Anasazi::ThyraMultiVec< ScalarType >::~ThyraMultiVec ( )
inlinevirtual

Destructor.

Definition at line 110 of file AnasaziThyraDebugAdapter.hpp.

Member Function Documentation

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::Clone ( const int  numvecs) const
inlinevirtual

Creates a new empty ThyraMultiVec containing numvecs columns.

Returns
Pointer to an ThyraMultiVec

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 121 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::CloneCopy ( ) const
inlinevirtual

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 132 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::CloneCopy ( const std::vector< int > &  index) const
inlinevirtual

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 146 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::CloneViewNonConst ( const std::vector< int > &  index)
inlinevirtual

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 160 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
const MultiVec<ScalarType>* Anasazi::ThyraMultiVec< ScalarType >::CloneView ( const std::vector< int > &  index) const
inlinevirtual

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 174 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
int Anasazi::ThyraMultiVec< ScalarType >::GetNumberVecs ( ) const
inlinevirtual

Obtain the vector length of *this.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 189 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
ptrdiff_t Anasazi::ThyraMultiVec< ScalarType >::GetGlobalLength ( ) const
inlinevirtual

Obtain the number of vectors in *this.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 192 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 
)
inlinevirtual

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

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 200 of file AnasaziThyraDebugAdapter.hpp.

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

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

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 211 of file AnasaziThyraDebugAdapter.hpp.

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

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

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 222 of file AnasaziThyraDebugAdapter.hpp.

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

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 235 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvScale ( ScalarType  alpha)
inlinevirtual

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

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 248 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvScale ( const std::vector< ScalarType > &  alpha)
inlinevirtual

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

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 252 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvNorm ( std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  normvec) const
inlinevirtual

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 261 of file AnasaziThyraDebugAdapter.hpp.

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

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 271 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvRandom ( )
inlinevirtual

Fill the vectors in *this with random numbers.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 280 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvInit ( ScalarType  alpha)
inlinevirtual

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

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 284 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 290 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 294 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 298 of file AnasaziThyraDebugAdapter.hpp.

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

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

Definition at line 318 of file AnasaziThyraDebugAdapter.hpp.

template<class ScalarType>
void Anasazi::ThyraMultiVec< ScalarType >::MvPrint ( std::ostream &  os) const
inlinevirtual

Print *this ThyraMultiVec.

Implements Anasazi::MultiVec< ScalarType >.

Definition at line 339 of file AnasaziThyraDebugAdapter.hpp.


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