NOX Development
Public Member Functions | Protected Member Functions | Protected Attributes
NOX::Thyra::MultiVector Class Reference

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

#include <NOX_Thyra_MultiVector.H>

Inheritance diagram for NOX::Thyra::MultiVector:
Inheritance graph
[legend]
Collaboration diagram for NOX::Thyra::MultiVector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MultiVector (const Teuchos::RCP< ::Thyra::MultiVectorBase< double > > &source)
 Constructor that creates a VIEW of the Thyra multivector.
 MultiVector (const ::Thyra::MultiVectorBase< double > &source)
 Construct from a given Thyra multivector.
 MultiVector (const NOX::Thyra::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 (std::ostream &stream) const
 Print the vector. This is meant for debugging purposes only.
virtual Teuchos::RCP
< ::Thyra::MultiVectorBase
< double > > 
getThyraMultiVector ()
 Get RCP to underlying Thyra vector.
virtual Teuchos::RCP< const
::Thyra::MultiVectorBase
< double > > 
getThyraMultiVector () const
 Get const RCP to underlying Thyra vector.
virtual
NOX::Abstract::MultiVector
init (double value)
 Initialize every element of this multi-vector with gamma.
virtual
NOX::Abstract::MultiVector
random (bool useSeed=false, int seed=1)
 Initialize each element of this multi-vector with a random value.
virtual
NOX::Abstract::MultiVector
operator= (const NOX::Abstract::MultiVector &source)
 Copy source multi-vector source into this multi-vector.
virtual
NOX::Abstract::MultiVector
setBlock (const NOX::Abstract::MultiVector &source, const std::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::MultiVector
augment (const NOX::Abstract::MultiVector &source)
 Append the vectors in source to *this.
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::Vector
operator[] (int i) const
 Return a const reference to the i-th column of the multivector as an abstract vector.
virtual
NOX::Abstract::MultiVector
scale (double gamma)
 Scale each element of this multivector by gamma.
virtual
NOX::Abstract::MultiVector
update (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::MultiVector
update (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::MultiVector
update (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 Teuchos::RCP
< NOX::Abstract::MultiVector
clone (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 Teuchos::RCP
< NOX::Abstract::MultiVector
clone (int numvecs) const
 Creates a new multi-vector with numvecs columns.
virtual Teuchos::RCP
< NOX::Abstract::MultiVector
subCopy (const std::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 Teuchos::RCP
< NOX::Abstract::MultiVector
subView (const std::vector< int > &index) const
 Creates a new multi-vector with ndex.size() columns that shares the columns of *this given by index.
virtual void norm (std::vector< double > &result, NOX::Abstract::Vector::NormType type=NOX::Abstract::Vector::TwoNorm) const
 Norm.
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)$.

Protected Member Functions

bool isContiguous (const std::vector< int > &index) const
 Check whether an index array is contiguous.

Protected Attributes

Teuchos::RCP
< ::Thyra::MultiVectorBase
< double > > 
thyraMultiVec
 Pointer to petra vector owned by this object.
std::vector< Teuchos::RCP
< NOX::Thyra::Vector > > 
noxThyraVectors
 NOX::Thyra::Vector's for each column of the multivector.

Detailed Description

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


Member Function Documentation

Teuchos::RCP< NOX::Abstract::MultiVector > NOX::Thyra::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.

Implements NOX::Abstract::MultiVector.

References Teuchos::rcp().


Member Data Documentation

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

Each Thyra_Vector in the NOX::Thyra::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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends