Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > > Class Template Reference

Template specialization of Anasazi::MultiVecTraits class using the Tpetra::MultiVector class. More...

#include <AnasaziTpetraAdapter.hpp>

List of all members.

Static Public Member Functions

Creation methods
static Teuchos::RCP< Tpetra::MultiVector<
Scalar, LO, GO, Node > > 
Clone (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, const int numvecs)
 Creates a new empty Tpetra::MultiVector<Scalar,LO,GO,Node> containing numvecs columns.
static Teuchos::RCP< Tpetra::MultiVector<
Scalar, LO, GO, Node > > 
CloneCopy (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv)
 Creates a new Tpetra::MultiVector<Scalar,LO,GO,Node> and copies contents of mv into the new vector (deep copy).
static Teuchos::RCP< Tpetra::MultiVector<
Scalar, LO, GO, Node > > 
CloneCopy (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, const std::vector< int > &index)
 Creates a new Tpetra::MultiVector<Scalar,LO,GO,Node> and copies the selected contents of mv into the new vector (deep copy).
static Teuchos::RCP< Tpetra::MultiVector<
Scalar, LO, GO, Node > > 
CloneView (Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, const std::vector< int > &index)
 Creates a new Tpetra::MultiVector<Scalar,LO,GO,Node> that shares the selected contents of mv (shallow copy).
static Teuchos::RCP< const
Tpetra::MultiVector< Scalar,
LO, GO, Node > > 
CloneView (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, const std::vector< int > &index)
 Creates a new const Tpetra::MultiVector<Scalar,LO,GO,Node> that shares the selected contents of mv (shallow copy).
Attribute methods
static int GetVecLength (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv)
 Obtain the vector length of mv.
static int GetNumberVecs (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv)
 Obtain the number of vectors in mv.
Update methods
static void MvTimesMatAddMv (const Scalar alpha, const Tpetra::MultiVector< Scalar, LO, GO, Node > &A, const Teuchos::SerialDenseMatrix< int, Scalar > &B, const Scalar beta, Tpetra::MultiVector< Scalar, LO, GO, Node > &mv)
 Update mv with $ \alpha AB + \beta mv $.
static void MvAddMv (const Scalar alpha, const Tpetra::MultiVector< Scalar, LO, GO, Node > &A, const Scalar beta, const Tpetra::MultiVector< Scalar, LO, GO, Node > &B, Tpetra::MultiVector< Scalar, LO, GO, Node > &mv)
 Replace mv with $\alpha A + \beta B$.
static void MvScale (Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, Scalar alpha)
 Scale each element of the vectors in mv with alpha.
static void MvScale (Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, const std::vector< Scalar > &alphas)
 Scale each element of the i-th vector in mv with alpha[i].
static void MvTransMv (const Scalar alpha, const Tpetra::MultiVector< Scalar, LO, GO, Node > &A, const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, Teuchos::SerialDenseMatrix< int, Scalar > &B)
 Compute a dense matrix B through the matrix-matrix multiply $ \alpha A^Tmv $.
static void MvDot (const Tpetra::MultiVector< Scalar, LO, GO, Node > &A, const Tpetra::MultiVector< Scalar, LO, GO, Node > &B, std::vector< Scalar > &dots)
 Compute a vector b where the components are the individual dot-products of the i-th columns of A and mv, i.e.$b[i] = A[i]^Tmv[i]$.
Norm method
static void MvNorm (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, std::vector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &normvec)
 Compute the 2-norm of each individual vector of mv. Upon return, normvec[i] holds the value of $||mv_i||_2$, the i-th column of mv.
Initialization methods
static void SetBlock (const Tpetra::MultiVector< Scalar, LO, GO, Node > &A, const std::vector< int > &index, Tpetra::MultiVector< Scalar, LO, GO, Node > &mv)
 Copy the vectors in A to a set of vectors in mv indicated by the indices given in index.
static void MvRandom (Tpetra::MultiVector< Scalar, LO, GO, Node > &mv)
 Replace the vectors in mv with random vectors.
static void MvInit (Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, Scalar alpha=Teuchos::ScalarTraits< Scalar >::zero())
 Replace each element of the vectors in mv with alpha.
Print method
static void MvPrint (const Tpetra::MultiVector< Scalar, LO, GO, Node > &mv, std::ostream &os)
 Print the mv multi-vector to the os output stream.


Detailed Description

template<class Scalar, class LO, class GO, class Node>
class Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >

Template specialization of Anasazi::MultiVecTraits class using the Tpetra::MultiVector class.

This interface ensures that any Tpetra::MultiVector will be accepted by the Anasazi templated solvers.

Definition at line 62 of file AnasaziTpetraAdapter.hpp.


Member Function Documentation

template<class Scalar, class LO, class GO, class Node>
static Teuchos::RCP<Tpetra::MultiVector<Scalar,LO,GO,Node> > Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::Clone ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
const int  numvecs 
) [inline, static]

Creates a new empty Tpetra::MultiVector<Scalar,LO,GO,Node> containing numvecs columns.

Returns:
Reference-counted pointer to the new Tpetra::MultiVector<Scalar,LO,GO,Node>.

Definition at line 73 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static Teuchos::RCP<Tpetra::MultiVector<Scalar,LO,GO,Node> > Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::CloneCopy ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv  )  [inline, static]

Creates a new Tpetra::MultiVector<Scalar,LO,GO,Node> and copies contents of mv into the new vector (deep copy).

Returns:
Reference-counted pointer to the new Tpetra::MultiVector<Scalar,LO,GO,Node>.

Definition at line 86 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static Teuchos::RCP<Tpetra::MultiVector<Scalar,LO,GO,Node> > Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::CloneCopy ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
const std::vector< int > &  index 
) [inline, static]

Creates a new Tpetra::MultiVector<Scalar,LO,GO,Node> and copies the selected contents of mv into the new vector (deep copy).

The copied vectors from mv are indicated by the indeX.size() indices in index.

Returns:
Reference-counted pointer to the new Tpetra::MultiVector<Scalar,LO,GO,Node>.

Definition at line 96 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static Teuchos::RCP<Tpetra::MultiVector<Scalar,LO,GO,Node> > Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::CloneView ( Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
const std::vector< int > &  index 
) [inline, static]

Creates a new Tpetra::MultiVector<Scalar,LO,GO,Node> that shares the selected contents of mv (shallow copy).

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

Returns:
Reference-counted pointer to the new Tpetra::MultiVector<Scalar,LO,GO,Node>.

Definition at line 122 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static Teuchos::RCP<const Tpetra::MultiVector<Scalar,LO,GO,Node> > Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::CloneView ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
const std::vector< int > &  index 
) [inline, static]

Creates a new const Tpetra::MultiVector<Scalar,LO,GO,Node> that shares the selected contents of mv (shallow copy).

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

Returns:
Reference-counted pointer to the new const Tpetra::MultiVector<Scalar,LO,GO,Node>.

Definition at line 148 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static int Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::GetVecLength ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv  )  [inline, static]

Obtain the vector length of mv.

Definition at line 175 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static int Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::GetNumberVecs ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv  )  [inline, static]

Obtain the number of vectors in mv.

Definition at line 179 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvTimesMatAddMv ( const Scalar  alpha,
const Tpetra::MultiVector< Scalar, LO, GO, Node > &  A,
const Teuchos::SerialDenseMatrix< int, Scalar > &  B,
const Scalar  beta,
Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv 
) [inline, static]

Update mv with $ \alpha AB + \beta mv $.

Definition at line 188 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvAddMv ( const Scalar  alpha,
const Tpetra::MultiVector< Scalar, LO, GO, Node > &  A,
const Scalar  beta,
const Tpetra::MultiVector< Scalar, LO, GO, Node > &  B,
Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv 
) [inline, static]

Replace mv with $\alpha A + \beta B$.

Definition at line 200 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvScale ( Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
Scalar  alpha 
) [inline, static]

Scale each element of the vectors in mv with alpha.

Definition at line 207 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvScale ( Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
const std::vector< Scalar > &  alphas 
) [inline, static]

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

Definition at line 212 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvTransMv ( const Scalar  alpha,
const Tpetra::MultiVector< Scalar, LO, GO, Node > &  A,
const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
Teuchos::SerialDenseMatrix< int, Scalar > &  B 
) [inline, static]

Compute a dense matrix B through the matrix-matrix multiply $ \alpha A^Tmv $.

Definition at line 217 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvDot ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  A,
const Tpetra::MultiVector< Scalar, LO, GO, Node > &  B,
std::vector< Scalar > &  dots 
) [inline, static]

Compute a vector b where the components are the individual dot-products of the i-th columns of A and mv, i.e.$b[i] = A[i]^Tmv[i]$.

Definition at line 228 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvNorm ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
std::vector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &  normvec 
) [inline, static]

Compute the 2-norm of each individual vector of mv. Upon return, normvec[i] holds the value of $||mv_i||_2$, the i-th column of mv.

Definition at line 248 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::SetBlock ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  A,
const std::vector< int > &  index,
Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv 
) [inline, static]

Copy the vectors in A to a set of vectors in mv indicated by the indices given in index.

Definition at line 264 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvRandom ( Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv  )  [inline, static]

Replace the vectors in mv with random vectors.

Definition at line 284 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvInit ( Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
Scalar  alpha = Teuchos::ScalarTraits<Scalar>::zero() 
) [inline, static]

Replace each element of the vectors in mv with alpha.

Definition at line 289 of file AnasaziTpetraAdapter.hpp.

template<class Scalar, class LO, class GO, class Node>
static void Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::MvPrint ( const Tpetra::MultiVector< Scalar, LO, GO, Node > &  mv,
std::ostream &  os 
) [inline, static]

Print the mv multi-vector to the os output stream.

Definition at line 299 of file AnasaziTpetraAdapter.hpp.


The documentation for this class was generated from the following file:
Generated on Wed May 12 21:24:35 2010 for Anasazi by  doxygen 1.4.7