NOX::Epetra::MultiVector Class Reference

Implementation of NOX::Abstract::MultiVector for Epetra multi-vectors. More...

#include <NOX_Epetra_MultiVector.H>

Inheritance diagram for NOX::Epetra::MultiVector:

[legend]
Collaboration diagram for NOX::Epetra::MultiVector:
[legend]
List of all members.

Public Member Functions

 MultiVector (Epetra_MultiVector &source, NOX::CopyType type=NOX::DeepCopy, bool createView=false)
 Construct by copying map and/or elements of an Epetra_MultiVector.
 MultiVector (const Epetra_MultiVector &source, NOX::CopyType type=NOX::DeepCopy)
 Construct by copying map and/or elements of an Epetra_MultiVector.
 MultiVector (const NOX::Epetra::MultiVector &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
 ~MultiVector ()
 Destruct MultiVector.
virtual int length () const
 Return the length of multi-vector.
virtual int numVectors () const
 Return the number of vectors in the multi-vector.
virtual void print () const
 Print the vector. This is meant for debugging purposes only.
Access to underlying Petra vector.
virtual Epetra_MultiVectorgetEpetraMultiVector ()
 Get reference to underlying Epetra vector.
virtual const Epetra_MultiVectorgetEpetraMultiVector () const
 Get const reference to underlying Epetra vector.
Initialization methods.
virtual NOX::Abstract::MultiVectorinit (double value)
 Initialize every element of this multi-vector with gamma.
virtual NOX::Abstract::MultiVectorrandom (bool useSeed=false, int seed=1)
 Initialize each element of this multi-vector with a random value.
virtual NOX::Abstract::MultiVectoroperator= (const Epetra_MultiVector &source)
 Copy source multi-vector source into this multi-vector.
virtual NOX::Abstract::MultiVectoroperator= (const NOX::Epetra::MultiVector &source)
 Copy source multi-vector source into this multi-vector.
virtual NOX::Abstract::MultiVectoroperator= (const NOX::Abstract::MultiVector &source)
 Copy source multi-vector source into this multi-vector.
virtual NOX::Abstract::MultiVectorsetBlock (const NOX::Abstract::MultiVector &source, const vector< int > &index)
 Copy the vectors in source to a set of vectors in *this. The index.size() vectors in source are copied to a subset of vectors in *this indicated by the indices given in index.
virtual NOX::Abstract::MultiVectorsetBlock (const NOX::Epetra::MultiVector &source, const vector< int > &index)
virtual NOX::Abstract::MultiVectoraugment (const NOX::Abstract::MultiVector &source)
 Append the vectors in source to *this.
virtual NOX::Abstract::MultiVectoraugment (const NOX::Epetra::MultiVector &source)
Accessor methods
virtual NOX::Abstract::Vectoroperator[] (int i)
 Return a reference to the i-th column of the multivector as an abstract vector.
virtual const NOX::Abstract::Vectoroperator[] (int i) const
 Return a const reference to the i-th column of the multivector as an abstract vector.
Update methods.
virtual NOX::Abstract::MultiVectorscale (double gamma)
 Scale each element of this multivector by gamma.
virtual NOX::Abstract::MultiVectorupdate (double alpha, const NOX::Abstract::MultiVector &a, double gamma=0.0)
 Compute x = (alpha * a) + (gamma * x) where a is a multi-vector and x = *this.
virtual NOX::Abstract::MultiVectorupdate (double alpha, const NOX::Epetra::MultiVector &a, double gamma=0.0)
virtual NOX::Abstract::MultiVectorupdate (double alpha, const NOX::Abstract::MultiVector &a, double beta, const NOX::Abstract::MultiVector &b, double gamma=0.0)
 Compute x = (alpha * a) + (beta * b) + (gamma * x) where a and b are multi-vectors and x = *this.
virtual NOX::Abstract::MultiVectorupdate (double alpha, const NOX::Epetra::MultiVector &a, double beta, const NOX::Epetra::MultiVector &b, double gamma=0.0)
virtual NOX::Abstract::MultiVectorupdate (Teuchos::ETransp transb, double alpha, const NOX::Abstract::MultiVector &a, const NOX::Abstract::MultiVector::DenseMatrix &b, double gamma=0.0)
 Compute x = (alpha * a * b) + (gamma * x) where a is a multivector, b is a dense matrix, x = *this, and op(b) = b if transb = Teuchos::NO_TRANS and op(b) is b transpose if transb = Teuchos::TRANS.
virtual NOX::Abstract::MultiVectorupdate (Teuchos::ETransp transb, double alpha, const NOX::Epetra::MultiVector &a, const NOX::Abstract::MultiVector::DenseMatrix &b, double gamma=0.0)
Creating new MultiVectors.
virtual NOX::Abstract::MultiVectorclone (CopyType type=DeepCopy) const
 Create a new Vector of the same underlying type by cloning "this", and return a pointer to the new vector.
virtual NOX::Abstract::MultiVectorclone (int numvecs) const
 Creates a new multi-vector with numvecs columns.
virtual NOX::Abstract::MultiVectorsubCopy (const vector< int > &index) const
 Creates a new multi-vector with index.size() columns whose columns are copies of the columns of *this given by index.
virtual NOX::Abstract::MultiVectorsubView (const vector< int > &index) const
 Creates a new multi-vector with ndex.size() columns that shares the columns of *this given by index.
Norms.
virtual void norm (vector< double > &result, NOX::Abstract::Vector::NormType type=NOX::Abstract::Vector::TwoNorm) const
 Norm.
Matrix products.
virtual void multiply (double alpha, const NOX::Abstract::MultiVector &y, NOX::Abstract::MultiVector::DenseMatrix &b) const
 Computes the matrix-matrix product $\alpha * y^T * (*this)$.
virtual void multiply (double alpha, const NOX::Epetra::MultiVector &y, NOX::Abstract::MultiVector::DenseMatrix &b) const

Protected Member Functions

 MultiVector (int numvecs)
 Constructor (Protected).
void checkIndex (int idx) const
 Checks whether an index is valid. Throws an error if invalid.

Protected Attributes

Epetra_MultiVectorepetraMultiVec
 Pointer to petra vector owned by this object.
vector< NOX::Epetra::Vector * > noxEpetraVectors
 NOX::Epetra::Vector's for each column of the multivector.

Detailed Description

Implementation of NOX::Abstract::MultiVector for Epetra multi-vectors.


Constructor & Destructor Documentation

NOX::Epetra::MultiVector::MultiVector Epetra_MultiVector source,
NOX::CopyType  type = NOX::DeepCopy,
bool  createView = false
 

Construct by copying map and/or elements of an Epetra_MultiVector.

Option for creating a "View": Construct a NOX::Epetra::MultiVector using the SAME memory location used in the source Epetra_MultiVector. WARNING: A View can be dangerous since multiple objects can access the same memory locations.


Member Function Documentation

NOX::Abstract::MultiVector * NOX::Epetra::MultiVector::clone CopyType  type = DeepCopy  )  const [virtual]
 

Create a new Vector of the same underlying type by cloning "this", and return a pointer to the new vector.

If type is NOX::DeepCopy, then we need to create an exact replica of "this". Otherwise, if type is NOX::ShapeCopy, we need only replicate the shape of "this". Note that there is no assumption that a vector created by ShapeCopy is initialized to zeros.

Returns:
Pointer to newly created vector or NULL if clone is not supported.


Member Data Documentation

vector<NOX::Epetra::Vector*> NOX::Epetra::MultiVector::noxEpetraVectors [mutable, protected]
 

NOX::Epetra::Vector's for each column of the multivector.

Each Epetra_Vector in the NOX::Epetra::Vector has a view into a column of the multivector and get filled in as needed by operator[].


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:40:49 2008 for NOX by doxygen 1.3.9.1