NOX::Petsc::Vector Class Reference

Implementation of NOX::Abstract::Vector for Petsc vectors. More...

#include <NOX_Petsc_Vector.H>

Inheritance diagram for NOX::Petsc::Vector:

[legend]
Collaboration diagram for NOX::Petsc::Vector:
[legend]
List of all members.

Protected initialization method used by constructors.

virtual int allocate (const Vec &source, CopyType type=DeepCopy)
Vec petscVec
 Pointer to Petsc vector owned by this object.
bool isAlloc
 Flag to indicate if the vector has been allocated.
string name

Public Member Functions

 Vector (const Vec &source, CopyType type=DeepCopy)
 Construct by copying map and/or elements of a Petsc Vec.
 Vector (const Vec &source, string name="Unnamed", CopyType type=DeepCopy)
 Construct by copying map and/or elements of a Petsc Vec.
 Vector (const Vector &source, CopyType type=DeepCopy)
 Construct by copying a NOX::Petsc::Vector.
 ~Vector ()
 Destruct Vector.
virtual int length () const
 Return the length of vector.
string Name ()
Access to underlying Petsc vector.
virtual Vec & getPetscVector ()
 Get reference to underlying Petsc vector.
virtual const Vec & getPetscVector () const
 Get const reference to underlying Petsc vector.
Initialization methods.
virtual Abstract::Vectorinit (double value)
 Initialize every element of this vector with gamma.
virtual Abstract::Vectoroperator= (const Vec &source)
 Copies source vector into "this".
virtual Abstract::Vectoroperator= (const Vector &source)
virtual Abstract::Vectoroperator= (const Abstract::Vector &source)
 See above.
virtual Abstract::Vectorabs (const Vector &source)
virtual Abstract::Vectorabs (const Abstract::Vector &source)
 See above.
virtual Abstract::Vectorreciprocal (const Vector &source)
virtual Abstract::Vectorreciprocal (const Abstract::Vector &source)
 See above.
Update methods.
virtual Abstract::Vectorscale (double gammaval)
 Scale each element of this vector by gamma.
virtual Abstract::Vectorscale (const Vector &a)
virtual Abstract::Vectorscale (const Abstract::Vector &a)
 See above.
virtual Abstract::Vectorupdate (double alpha, const Vector &a, double gammaval=0.0)
virtual Abstract::Vectorupdate (double alpha, const Abstract::Vector &a, double gammaval=0.0)
 See above.
virtual Abstract::Vectorupdate (double alpha, const Vector &a, double beta, const Vector &b, double gammaval=0.0)
virtual Abstract::Vectorupdate (double alpha, const Abstract::Vector &a, double beta, const Abstract::Vector &b, double gammaval=0.0)
 See above.
Creating new Vectors.
virtual Abstract::Vectorclone (CopyType type=DeepCopy) const
Norms.
virtual double norm (Abstract::Vector::NormType type=TwoNorm) const
virtual double norm (const Vector &weights) const
virtual double norm (const Abstract::Vector &weights) const
 See above.
Dot products
virtual double dot (const Vector &y) const
virtual double dot (const Abstract::Vector &y) const
 See above.

Detailed Description

Implementation of NOX::Abstract::Vector for Petsc vectors.


Member Function Documentation

Abstract::Vector & Vector::init double  value  )  [virtual]
 

Initialize every element of this vector with gamma.

Here x represents this vector, and we update it as

\[ x_i = \gamma \quad \mbox{for } i=1,\dots,n \]

Returns:
Reference to this object

Implements NOX::Abstract::Vector.

int Vector::length  )  const [virtual]
 

Return the length of vector.

Returns:
The length of this vector
Note:
Even if the vector is distributed across processors, this should return the global length of the vector.

Implements NOX::Abstract::Vector.

Abstract::Vector & Vector::scale double  gammaval  )  [virtual]
 

Scale each element of this vector by gamma.

Here x represents this vector, and we update it as

\[ x_i = \gamma x_i \quad \mbox{for } i=1,\dots,n \]

Returns:
Reference to this object

Implements NOX::Abstract::Vector.


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