Anasazi::EpetraMultiVec Class Reference

Basic adapter class for Anasazi::MultiVec that uses Epetra_MultiVector. More...

#include <AnasaziEpetraAdapter.hpp>

Inheritance diagram for Anasazi::EpetraMultiVec:

[legend]
Collaboration diagram for Anasazi::EpetraMultiVec:
[legend]
List of all members.

Public Member Functions

Constructors/Destructors
 EpetraMultiVec (const Epetra_BlockMap &Map, const int numvecs)
 Basic EpetraMultiVec constructor.
 EpetraMultiVec (const Epetra_MultiVector &P_vec)
 Copy constructor.
 EpetraMultiVec (const Epetra_BlockMap &Map, double *array, const int numvecs, const int stride=0)
 Create multi-vector with values from two dimensional array.
 EpetraMultiVec (Epetra_DataAccess CV, const Epetra_MultiVector &P_vec, const std::vector< int > &index)
 Create multi-vector from list of vectors in an existing EpetraMultiVec.
virtual ~EpetraMultiVec ()
 Destructor.
Creation methods
MultiVec< double > * Clone (const int numvecs) const
 Creates a new empty EpetraMultiVec containing numvecs columns.
MultiVec< double > * CloneCopy () const
 Creates a new EpetraMultiVec and copies contents of *this into the new vector (deep copy).
MultiVec< double > * CloneCopy (const std::vector< int > &index) const
 Creates a new EpetraMultiVec and copies the selected contents of *this into the new vector (deep copy).
MultiVec< double > * CloneView (const std::vector< int > &index)
 Creates a new EpetraMultiVec 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 (const double alpha, const MultiVec< double > &A, const Teuchos::SerialDenseMatrix< int, double > &B, const double beta)
 Update *this with $\alpha AB + \beta (*this)$.
void MvAddMv (const double alpha, const MultiVec< double > &A, const double beta, const MultiVec< double > &B)
 Replace *this with $\alpha A + \beta B$.
void MvTransMv (const double alpha, const MultiVec< double > &A, Teuchos::SerialDenseMatrix< int, double > &B) const
 Compute a dense matrix B through the matrix-matrix multiply $\alpha A^T(*this)$.
void MvDot (const MultiVec< double > &A, std::vector< double > *b) const
 Compute a vector b where the components are the individual dot-products, i.e. $ b[i] = A[i]^T(this[i])$ where A[i] is the i-th column of A.
Norm method
void MvNorm (std::vector< double > *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< double > &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 (const double alpha)
 Replace each element of the vectors in *this with alpha.
Print method.
void MvPrint () const
 Print *this EpetraMultiVec.

Detailed Description

Basic adapter class for Anasazi::MultiVec that uses Epetra_MultiVector.

Note:
The Epetra package performs double-precision arithmetic, so the use of Epetra with Anasazi will only provide a double-precision eigensolver.


Constructor & Destructor Documentation

Anasazi::EpetraMultiVec::EpetraMultiVec const Epetra_BlockMap Map,
const int  numvecs
 

Basic EpetraMultiVec constructor.

Parameters:
Map [in] An Epetra_LocalMap, Epetra_Map or Epetra_BlockMap.
numvecs [in] Number of vectors in multi-vector.
Returns:
Pointer to an EpetraMultiVec

Anasazi::EpetraMultiVec::EpetraMultiVec const Epetra_BlockMap Map,
double *  array,
const int  numvecs,
const int  stride = 0
 

Create multi-vector with values from two dimensional array.

Parameters:
Map [in] An Epetra_LocalMap, Epetra_Map or Epetra_BlockMap
array [in] Pointer to an array of double precision numbers. The first vector starts at array, the second at array+stride, and so on. This array is copied.
numvecs [in] Number of vectors in the multi-vector.
stride [in] The stride between vectors in memory of array.
Returns:
Pointer to an EpetraMultiVec

Anasazi::EpetraMultiVec::EpetraMultiVec Epetra_DataAccess  CV,
const Epetra_MultiVector P_vec,
const std::vector< int > &  index
 

Create multi-vector from list of vectors in an existing EpetraMultiVec.

Parameters:
CV [in] Enumerated type set to Copy or View.
P_vec [in] An existing fully constructed Epetra_MultiVector.
index [in] A integer vector containing the indices of the vectors to copy out of P_vec.
Returns:
Pointer to an EpetraMultiVec


Member Function Documentation

MultiVec< double > * Anasazi::EpetraMultiVec::Clone const int  numvecs  )  const [virtual]
 

Creates a new empty EpetraMultiVec containing numvecs columns.

Returns:
Pointer to an EpetraMultiVec

Implements Anasazi::MultiVec< double >.

MultiVec< double > * Anasazi::EpetraMultiVec::CloneCopy const std::vector< int > &  index  )  const [virtual]
 

Creates a new EpetraMultiVec 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 EpetraMultiVec

Implements Anasazi::MultiVec< double >.

MultiVec< double > * Anasazi::EpetraMultiVec::CloneCopy  )  const [virtual]
 

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

Returns:
Pointer to an EpetraMultiVec

Implements Anasazi::MultiVec< double >.

MultiVec< double > * Anasazi::EpetraMultiVec::CloneView const std::vector< int > &  index  )  [virtual]
 

Creates a new EpetraMultiVec 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 EpetraMultiVec

Implements Anasazi::MultiVec< double >.

void Anasazi::EpetraMultiVec::SetBlock const MultiVec< double > &  A,
const std::vector< int > &  index
[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< double >.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:41:36 2008 for Anasazi by doxygen 1.3.9.1