#include <NOX_Epetra_Vector.H>
Inheritance diagram for NOX::Epetra::Vector:
Public Types | |
| enum | MemoryType { CreateView, CreateCopy } |
| Type of memory management to use when constructing the vector. More... | |
Public Member Functions | |
| Vector (const Teuchos::RefCountPtr< Epetra_Vector > &source, NOX::Epetra::Vector::MemoryType memoryType=NOX::Epetra::Vector::CreateCopy, NOX::CopyType type=NOX::DeepCopy, Teuchos::RefCountPtr< NOX::Epetra::VectorSpace > vs=Teuchos::null) | |
| Constructor that creates a COPY or VIEW of the Epetra_Vector. | |
| Vector (const Epetra_Vector &source, NOX::CopyType type=NOX::DeepCopy, Teuchos::RefCountPtr< NOX::Epetra::VectorSpace > vs=Teuchos::null) | |
| Construct by copying map and/or elements of an Epetra_Vector. | |
| Vector (const NOX::Epetra::Vector &source, NOX::CopyType type=NOX::DeepCopy) | |
| Copy constructor. | |
| ~Vector () | |
| Destruct Vector. | |
| virtual int | length () const |
| Return the length of vector. | |
| virtual void | print (std::ostream &stream) const |
| Print the vector. To be used for debugging only. | |
|
virtual Teuchos::RefCountPtr< NOX::Epetra::VectorSpace > | getVectorSpace () const |
| Returns the NOX::Epetra::VectorSpace associated with this vector. | |
Access to underlying Petra vector. | |
| virtual Epetra_Vector & | getEpetraVector () |
| Get reference to underlying Epetra vector. | |
| virtual const Epetra_Vector & | getEpetraVector () const |
| Get const reference to underlying Epetra vector. | |
Initialization methods. | |
| virtual NOX::Abstract::Vector & | init (double gamma) |
Initialize every element of this vector with gamma. | |
| virtual NOX::Abstract::Vector & | random (bool useSeed=false, int seed=1) |
| Initialize each element of this vector with a random value. | |
| virtual NOX::Abstract::Vector & | operator= (const Epetra_Vector &y) |
| Copies source vector into "this". | |
| virtual NOX::Abstract::Vector & | operator= (const NOX::Epetra::Vector &y) |
| virtual NOX::Abstract::Vector & | operator= (const NOX::Abstract::Vector &y) |
Copy source vector y into this vector. | |
| virtual NOX::Abstract::Vector & | abs (const NOX::Epetra::Vector &y) |
| virtual NOX::Abstract::Vector & | abs (const NOX::Abstract::Vector &y) |
Put element-wise absolute values of source vector y into this vector. | |
| virtual NOX::Abstract::Vector & | reciprocal (const NOX::Epetra::Vector &y) |
| virtual NOX::Abstract::Vector & | reciprocal (const NOX::Abstract::Vector &y) |
Put element-wise reciprocal of source vector y into this vector. | |
Update methods. | |
| virtual NOX::Abstract::Vector & | scale (double gamma) |
Scale each element of this vector by gamma. | |
| virtual NOX::Abstract::Vector & | scale (const NOX::Epetra::Vector &a) |
| virtual NOX::Abstract::Vector & | scale (const NOX::Abstract::Vector &a) |
| Scale this vector element-by-element by the vector a. | |
| virtual NOX::Abstract::Vector & | update (double alpha, const NOX::Epetra::Vector &a, double gamma=0.0) |
| virtual NOX::Abstract::Vector & | update (double alpha, const NOX::Abstract::Vector &a, double gamma=0.0) |
| Compute x = (alpha * a) + (gamma * x) where x is this vector. | |
| virtual NOX::Abstract::Vector & | update (double alpha, const NOX::Epetra::Vector &a, double beta, const NOX::Epetra::Vector &b, double gamma=0.0) |
| virtual NOX::Abstract::Vector & | update (double alpha, const NOX::Abstract::Vector &a, double beta, const NOX::Abstract::Vector &b, double gamma=0.0) |
| Compute x = (alpha * a) + (beta * b) + (gamma * x) where x is this vector. | |
Creating new Vectors. | |
|
virtual Teuchos::RefCountPtr< NOX::Abstract::Vector > | clone (CopyType type=DeepCopy) const |
| virtual Teuchos::RefCountPtr< NOX::Abstract::MultiVector > | createMultiVector (const NOX::Abstract::Vector *const *vecs, int numVecs, NOX::CopyType type=NOX::DeepCopy) const |
Create a MultiVector with numVecs+1 columns out of an array of Vectors. The vector stored under this will be the first column with the remaining numVecs columns given by vecs. | |
| virtual Teuchos::RefCountPtr< NOX::Abstract::MultiVector > | createMultiVector (int numVecs, NOX::CopyType type=NOX::DeepCopy) const |
Create a MultiVector with numVecs columns. | |
Norms. | |
| virtual double | norm (NOX::Abstract::Vector::NormType type=TwoNorm) const |
| Norm. | |
| virtual double | norm (const NOX::Epetra::Vector &weights) const |
| virtual double | norm (const NOX::Abstract::Vector &weights) const |
| Weighted 2-Norm. | |
Inner products | |
| virtual double | innerProduct (const NOX::Epetra::Vector &y) const |
| virtual double | innerProduct (const NOX::Abstract::Vector &y) const |
Inner product with y. | |
Protected Attributes | |
| Teuchos::RefCountPtr< Epetra_Vector > | epetraVec |
| Pointer to petra vector owned by this object. | |
| Teuchos::RefCountPtr< NOX::Epetra::VectorSpace > | vectorSpace |
| Pointer to the vector space. | |
|
|
Type of memory management to use when constructing the vector.
|
|
||||||||||||||||||||
|
Constructor that creates a COPY or VIEW of the Epetra_Vector. NOTE: This ctor should just always create a view. It should be implicit from the fact that a RefCountPtr object is being passed in that a persisting relationship is present. However, since this could cause confusion, the default is to make a copy and if a user wants a view, they must pass in an explicit flag. A VIEW of a vector uses the same underlying memory. WARNING: A View can be dangerous since multiple objects can access the same memory locations. |
|
||||||||||||||||
|
Construct by copying map and/or elements of an Epetra_Vector. Allocates an entirely new vector. Does NOT allow for a view. |
|
|
Put element-wise absolute values of source vector Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
||||||||||||
|
Create a MultiVector with The implementation here creates a NOX::Epetra::MultiVector with either Shape or Deep copies of the supplied vector. Reimplemented from NOX::Abstract::Vector. |
|
||||||||||||||||
|
Create a MultiVector with The implementation here creates a NOX::Epetra::MultiVector with either Shape or Deep copies of the supplied vectors. Reimplemented from NOX::Abstract::Vector. |
|
|
Initialize every element of this vector with Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Inner product with Here x represents this vector, and we compute its inner product with y as follows:
Implements NOX::Abstract::Vector. |
|
|
Return the length of vector.
Implements NOX::Abstract::Vector. |
|
|
Weighted 2-Norm. Here x represents this vector, and we compute its weighted norm as follows:
Implements NOX::Abstract::Vector. |
|
|
Norm. Here x represents this vector, and we compute its norm as follows: for each NOX::Abstract::Vector::NormType:
Implements NOX::Abstract::Vector. |
|
|
Copy source vector Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Copies source vector into "this". NOTE: this will NOT copy the underlying vector space into the new vector. |
|
||||||||||||
|
Initialize each element of this vector with a random value.
If Default implementation throw an error. Only referenced by LOCA methods.
Reimplemented from NOX::Abstract::Vector. |
|
|
Put element-wise reciprocal of source vector Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Scale this vector element-by-element by the vector a. Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Scale each element of this vector by Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
||||||||||||||||||||||||
|
Compute x = (alpha * a) + (beta * b) + (gamma * x) where x is this vector. Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
||||||||||||||||
|
Compute x = (alpha * a) + (gamma * x) where x is this vector. Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
1.3.9.1