NOX Development
|
Default implementation for NOX::Abstract::MultiVector using an array of NOX::Abstract::MultiVector's. More...
#include <NOX_MultiVector.H>
Public Member Functions | |
MultiVector (const NOX::Abstract::Vector &v, int numVecs=1, NOX::CopyType type=NOX::DeepCopy) | |
Create MultiVector with numVecs columns out of a single NOX::Abstract::Vector. | |
MultiVector (const NOX::Abstract::Vector *const *vs, int numVecs, NOX::CopyType type=NOX::DeepCopy) | |
Create MultiVector out of array of NOX::Abstract::Vector's. | |
MultiVector (const MultiVector &source, NOX::CopyType type=NOX::DeepCopy) | |
Copy constructor. | |
virtual | ~MultiVector () |
Destructor. | |
virtual NOX::Abstract::MultiVector & | init (double gamma) |
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 & | operator= (const NOX::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 & | setBlock (const NOX::MultiVector &source, const std::vector< int > &index) |
virtual NOX::Abstract::MultiVector & | augment (const NOX::Abstract::MultiVector &source) |
Append the vectors in source to *this . | |
virtual NOX::Abstract::MultiVector & | augment (const NOX::MultiVector &source) |
virtual NOX::Abstract::Vector & | operator[] (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::MultiVector &a, double gamma=0.0) |
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 (double alpha, const NOX::MultiVector &a, double beta, const NOX::MultiVector &b, double gamma=0.0) |
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 NOX::Abstract::MultiVector & | update (Teuchos::ETransp transb, double alpha, const NOX::MultiVector &a, const NOX::Abstract::MultiVector::DenseMatrix &b, double gamma=0.0) |
virtual Teuchos::RCP< NOX::Abstract::MultiVector > | clone (NOX::CopyType type=NOX::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 index.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 ![]() | |
virtual void | multiply (double alpha, const NOX::MultiVector &y, NOX::Abstract::MultiVector::DenseMatrix &b) const |
virtual NOX::size_type | 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. | |
![]() | |
MultiVector () | |
Default constructor. Does nothing. | |
virtual | ~MultiVector () |
Destructor. Does nothing. | |
virtual NOX::Abstract::MultiVector & | init (double gamma)=0 |
Initialize every element of this multi-vector with gamma . | |
virtual NOX::Abstract::MultiVector & | random (bool useSeed=false, int seed=1)=0 |
Initialize each element of this multi-vector with a random value. | |
virtual NOX::Abstract::MultiVector & | operator= (const NOX::Abstract::MultiVector &source)=0 |
Copy source multi-vector source into this multi-vector. | |
virtual NOX::Abstract::MultiVector & | setBlock (const NOX::Abstract::MultiVector &source, const std::vector< int > &index)=0 |
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)=0 |
Append the vectors in source to *this . | |
virtual NOX::Abstract::Vector & | operator[] (int i)=0 |
Return a reference to the i-th column of the multivector as an abstract vector. | |
virtual const NOX::Abstract::Vector & | operator[] (int i) const =0 |
Return a const reference to the i-th column of the multivector as an abstract vector. | |
virtual NOX::Abstract::MultiVector & | scale (double gamma)=0 |
Scale each element of this multivector by gamma . | |
virtual NOX::Abstract::MultiVector & | update (double alpha, const NOX::Abstract::MultiVector &a, double gamma=0.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)=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 DenseMatrix &b, double gamma=0.0)=0 |
Compute x = (alpha * a * op(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 (NOX::CopyType type=NOX::DeepCopy) const =0 |
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 =0 |
Creates a new multi-vector with numvecs columns. | |
virtual Teuchos::RCP< NOX::Abstract::MultiVector > | subCopy (const std::vector< int > &index) const =0 |
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 =0 |
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 =0 |
Norm. | |
virtual void | multiply (double alpha, const NOX::Abstract::MultiVector &y, DenseMatrix &b) const =0 |
Computes the matrix-matrix product ![]() | |
virtual NOX::size_type | length () const =0 |
Return the length of multi-vector. | |
virtual int | numVectors () const =0 |
Return the number of vectors in the multi-vector. | |
virtual void | print (std::ostream &stream) const =0 |
Print the vector. This is meant for debugging purposes only. | |
Protected Attributes | |
std::vector< Teuchos::RCP< NOX::Abstract::Vector > > | vecs |
Stores pointers to NOX::Abstract::Vector's. | |
Additional Inherited Members | |
![]() | |
typedef Teuchos::SerialDenseMatrix< int, double > | DenseMatrix |
Typename of dense matrices. | |
Default implementation for NOX::Abstract::MultiVector using an array of NOX::Abstract::MultiVector's.
|
virtual |
Destructor.
Reimplemented from NOX::Abstract::MultiVector.
|
virtual |
Append the vectors in source
to *this
.
Implements NOX::Abstract::MultiVector.
|
virtual |
Creates a new multi-vector with numvecs
columns.
Implements NOX::Abstract::MultiVector.
References NOX::ShapeCopy.
|
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.
Implements NOX::Abstract::MultiVector.
|
virtual |
Initialize every element of this multi-vector with gamma
.
Implements NOX::Abstract::MultiVector.
|
virtual |
Return the length of multi-vector.
Implements NOX::Abstract::MultiVector.
|
virtual |
Computes the matrix-matrix product
Implements NOX::Abstract::MultiVector.
|
virtual |
Norm.
Implements NOX::Abstract::MultiVector.
|
virtual |
Return the number of vectors in the multi-vector.
Implements NOX::Abstract::MultiVector.
|
virtual |
Copy source multi-vector source
into this multi-vector.
Implements NOX::Abstract::MultiVector.
|
virtual |
Return a reference to the i-th column of the multivector as an abstract vector.
Implements NOX::Abstract::MultiVector.
|
virtual |
Return a const reference to the i-th column of the multivector as an abstract vector.
Implements NOX::Abstract::MultiVector.
|
virtual |
Print the vector. This is meant for debugging purposes only.
Implements NOX::Abstract::MultiVector.
|
virtual |
Initialize each element of this multi-vector with a random value.
Implements NOX::Abstract::MultiVector.
References NOX::Abstract::MultiVector::random().
|
virtual |
Scale each element of this multivector by gamma
.
Implements NOX::Abstract::MultiVector.
|
virtual |
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
.
Implements NOX::Abstract::MultiVector.
|
virtual |
Creates a new multi-vector with index.size()
columns whose columns are copies of the columns of *this
given by index
.
Implements NOX::Abstract::MultiVector.
References NOX::DeepCopy.
|
virtual |
Creates a new multi-vector with index.size()
columns that shares the columns of *this
given by index
.
Implements NOX::Abstract::MultiVector.
|
virtual |
Compute x = (alpha * a) + (beta * b) + (gamma * x) where a
and b
are multi-vectors and x
= *this
.
Implements NOX::Abstract::MultiVector.
|
virtual |
Compute x = (alpha * a) + (gamma * x) where a
is a multi-vector and x
= *this
.
Implements NOX::Abstract::MultiVector.
|
virtual |
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.
Implements NOX::Abstract::MultiVector.