Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | List of all members
Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > > Class Template Reference

Specialization of MultiVecTraits for MV = Tpetra::MultiVector. More...

#include <AnasaziTpetraAdapter.hpp>

Static Public Member Functions

static Teuchos::RCP< MV > Clone (const MV &X, const int numVecs)
 Create a new MultiVector with numVecs columns. More...
 
static Teuchos::RCP< MV > CloneCopy (const MV &X)
 Create and return a deep copy of X. More...
 
static Teuchos::RCP< MV > CloneCopy (const MV &mv, const std::vector< int > &index)
 Create and return a deep copy of the given columns of mv. More...
 
static Teuchos::RCP< MV > CloneCopy (const MV &mv, const Teuchos::Range1D &index)
 Create and return a deep copy of the given columns of mv. More...
 
static void MvAddMv (Scalar alpha, const MV &A, Scalar beta, const MV &B, MV &mv)
 mv := alpha*A + beta*B More...
 
static void MvDot (const MV &A, const MV &B, std::vector< Scalar > &dots)
 For all columns j of A, set dots[j] := A[j]^T * B[j]. More...
 
static void MvNorm (const MV &mv, std::vector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &normvec)
 For all columns j of mv, set normvec[j] = norm(mv[j]). More...
 

Detailed Description

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

Specialization of MultiVecTraits for MV = Tpetra::MultiVector.

This interface lets Anasazi' solvers work directly with Tpetra::MultiVector objects as the MultiVector type. That type corresponds to the MV template parameter, which is the second template parameter (after Scalar) of most Anasazi classes.

The four template parameters of this partial specialization correspond exactly to the four template parameters of Tpetra::MultiVector. See the Tpetra::MultiVector documentation for more information.

Definition at line 117 of file AnasaziTpetraAdapter.hpp.

Member Function Documentation

template<class Scalar , class LO , class GO , class Node >
static Teuchos::RCP<MV> Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::Clone ( const MV &  X,
const int  numVecs 
)
inlinestatic

Create a new MultiVector with numVecs columns.

The returned Tpetra::MultiVector has the same Tpetra::Map (distribution over one or more parallel processes) as X. Its entries are not initialized and have undefined values.

Definition at line 125 of file AnasaziTpetraAdapter.hpp.

template<class Scalar , class LO , class GO , class Node >
static Teuchos::RCP<MV> Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::CloneCopy ( const MV &  X)
inlinestatic

Create and return a deep copy of X.

Definition at line 132 of file AnasaziTpetraAdapter.hpp.

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

Create and return a deep copy of the given columns of mv.

Precondition
mv.getNumVectors() != 0 || index.size() == 0
For all k such that 0 <= k < index.size(),
0 <= index[k] < mv.getNumVectors();
Postcondition
If this method returns Y:
Y->isConstantStride() && Y->getNumVectors() == index.size();

Definition at line 160 of file AnasaziTpetraAdapter.hpp.

template<class Scalar , class LO , class GO , class Node >
static Teuchos::RCP<MV> Anasazi::MultiVecTraits< Scalar, Tpetra::MultiVector< Scalar, LO, GO, Node > >::CloneCopy ( const MV &  mv,
const Teuchos::Range1D index 
)
inlinestatic

Create and return a deep copy of the given columns of mv.

Postcondition
If this method returns Y:
Y->isConstantStride() && Y->getNumVectors() == index.size();

Definition at line 196 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 ( Scalar  alpha,
const MV &  A,
Scalar  beta,
const MV &  B,
MV &  mv 
)
inlinestatic

mv := alpha*A + beta*B

The Tpetra specialization of this method ignores and completely overwrites any NaN or Inf entries in A. Thus, it does not mean the same thing as mv := 0*mv + alpha*A + beta*B in IEEE 754 floating-point arithmetic. (Remember that NaN*0 = NaN.)

Definition at line 412 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 MV &  A,
const MV &  B,
std::vector< Scalar > &  dots 
)
inlinestatic

For all columns j of A, set dots[j] := A[j]^T * B[j].

Definition at line 508 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 MV &  mv,
std::vector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &  normvec 
)
inlinestatic

For all columns j of mv, set normvec[j] = norm(mv[j]).

Definition at line 532 of file AnasaziTpetraAdapter.hpp.


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