NOX::Thyra::Vector Class Reference

Implementation of NOX::Thyra::Vector. More...

#include <NOX_Thyra_Vector.H>

Inheritance diagram for NOX::Thyra::Vector:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Vector (const Teuchos::RCP< ::Thyra::VectorBase< double > > &src)
 Construct a vector as a view of a given Thyra vector.
 Vector (const ::Thyra::VectorBase< double > &source)
 Construct a vector from a given Thyra vector.
 Vector (const NOX::Thyra::Vector &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
 ~Vector ()
 Destruct Vector.
int length () const
 Return the length of vector.
void print (std::ostream &stream) const
 Print the vector. To be used for debugging only.
virtual ::Thyra::VectorBase
< double > & 
getThyraVector ()
 Get reference to underlying Thyra vector.
virtual const
::Thyra::VectorBase< double > & 
getThyraVector () const
 Get const reference to underlying Thyra vector.
virtual Teuchos::RCP
< ::Thyra::VectorBase< double > > 
getThyraRCPVector ()
 Get RCP to underlying Thyra vector.
virtual Teuchos::RCP< const
::Thyra::VectorBase< double > > 
getThyraRCPVector () const
 Get RCP to underlying Thyra vector.
NOX::Abstract::Vectorinit (double gamma)
 Initialize every element of this vector with gamma.
NOX::Abstract::Vectorrandom (bool useSeed=false, int seed=1)
 Initialize every element of this vector with random values.
NOX::Abstract::Vectoroperator= (const NOX::Abstract::Vector &y)
 Copy source vector y into this vector.
NOX::Abstract::Vectoroperator= (const NOX::Thyra::Vector &y)
NOX::Abstract::Vectorabs (const NOX::Abstract::Vector &y)
 Put element-wise absolute values of source vector y into this vector.
NOX::Abstract::Vectorreciprocal (const NOX::Abstract::Vector &y)
 Put element-wise reciprocal of source vector y into this vector.
NOX::Abstract::Vectorscale (double gamma)
 Scale each element of this vector by gamma.
NOX::Abstract::Vectorscale (const NOX::Abstract::Vector &a)
 Scale this vector element-by-element by the vector a.
NOX::Abstract::Vectorupdate (double alpha, const NOX::Abstract::Vector &a, double gamma=0.0)
 Compute x = (alpha * a) + (gamma * x) where x is this vector.
NOX::Abstract::Vectorupdate (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.
Teuchos::RCP
< NOX::Abstract::Vector
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
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::RCP
< NOX::Abstract::MultiVector
createMultiVector (int numVecs, NOX::CopyType type=NOX::DeepCopy) const
 Create a MultiVector with numVecs columns.
double norm (NOX::Abstract::Vector::NormType type=NOX::Abstract::Vector::TwoNorm) const
 ! Norm
double norm (const NOX::Abstract::Vector &weights) const
 Weighted 2-Norm.
double innerProduct (const NOX::Abstract::Vector &y) const
 Inner product with y.

Protected Attributes

Teuchos::RCP
< ::Thyra::VectorBase< double > > 
thyraVec
 Pointer to Thyra vector owned by this object.


Detailed Description

Implementation of NOX::Thyra::Vector.

Definition at line 66 of file NOX_Thyra_Vector.H.


Constructor & Destructor Documentation

NOX::Thyra::Vector::Vector ( const Teuchos::RCP< ::Thyra::VectorBase< double > > &  src  ) 

Construct a vector as a view of a given Thyra vector.

Creates a view and does not allocate a new vector

Definition at line 49 of file NOX_Thyra_Vector.C.

NOX::Thyra::Vector::Vector ( const ::Thyra::VectorBase< double > &  source  ) 

Construct a vector from a given Thyra vector.

Allocates an entirely new vector

Definition at line 55 of file NOX_Thyra_Vector.C.

NOX::Thyra::Vector::Vector ( const NOX::Thyra::Vector source,
NOX::CopyType  type = NOX::DeepCopy 
)

Copy constructor.

Definition at line 61 of file NOX_Thyra_Vector.C.

NOX::Thyra::Vector::~Vector (  )  [virtual]

Destruct Vector.

Reimplemented from NOX::Abstract::Vector.

Definition at line 67 of file NOX_Thyra_Vector.C.


Member Function Documentation

Thyra::VectorBase< double > & NOX::Thyra::Vector::getThyraVector (  ) 

Get reference to underlying Thyra vector.

Definition at line 91 of file NOX_Thyra_Vector.C.

References thyraVec.

Referenced by LOCA::Thyra::Group::applyShiftedMatrix(), and Thyra::NOXNonlinearSolver::solve().

const ::Thyra::VectorBase< double > & NOX::Thyra::Vector::getThyraVector (  )  const [virtual]

Get const reference to underlying Thyra vector.

Definition at line 98 of file NOX_Thyra_Vector.C.

References thyraVec.

Teuchos::RCP<::Thyra::VectorBase< double > > NOX::Thyra::Vector::getThyraRCPVector (  )  [virtual]

Get RCP to underlying Thyra vector.

Definition at line 105 of file NOX_Thyra_Vector.C.

References thyraVec.

Referenced by LOCA::Thyra::Group::computeDfDpMulti().

Teuchos::RCP< const ::Thyra::VectorBase< double > > NOX::Thyra::Vector::getThyraRCPVector (  )  const [virtual]

Get RCP to underlying Thyra vector.

Definition at line 112 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::init ( double  gamma  )  [virtual]

Initialize every element of this vector with gamma.

Implements NOX::Abstract::Vector.

Definition at line 119 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::random ( bool  useSeed = false,
int  seed = 1 
) [virtual]

Initialize every element of this vector with random values.

Reimplemented from NOX::Abstract::Vector.

Definition at line 127 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::operator= ( const NOX::Abstract::Vector y  )  [virtual]

Copy source vector y into this vector.

Implements NOX::Abstract::Vector.

Definition at line 73 of file NOX_Thyra_Vector.C.

NOX::Abstract::Vector & NOX::Thyra::Vector::abs ( const NOX::Abstract::Vector y  )  [virtual]

Put element-wise absolute values of source vector y into this vector.

Implements NOX::Abstract::Vector.

Definition at line 137 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::reciprocal ( const NOX::Abstract::Vector y  )  [virtual]

Put element-wise reciprocal of source vector y into this vector.

Implements NOX::Abstract::Vector.

Definition at line 147 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::scale ( double  gamma  )  [virtual]

Scale each element of this vector by gamma.

Implements NOX::Abstract::Vector.

Definition at line 157 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::scale ( const NOX::Abstract::Vector a  )  [virtual]

Scale this vector element-by-element by the vector a.

Implements NOX::Abstract::Vector.

Definition at line 165 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::update ( double  alpha,
const NOX::Abstract::Vector a,
double  gamma = 0.0 
) [virtual]

Compute x = (alpha * a) + (gamma * x) where x is this vector.

Implements NOX::Abstract::Vector.

Definition at line 175 of file NOX_Thyra_Vector.C.

References thyraVec.

NOX::Abstract::Vector & NOX::Thyra::Vector::update ( double  alpha,
const NOX::Abstract::Vector a,
double  beta,
const NOX::Abstract::Vector b,
double  gamma = 0.0 
) [virtual]

Compute x = (alpha * a) + (beta * b) + (gamma * x) where x is this vector.

Implements NOX::Abstract::Vector.

Definition at line 185 of file NOX_Thyra_Vector.C.

References thyraVec.

Teuchos::RCP< NOX::Abstract::Vector > NOX::Thyra::Vector::clone ( NOX::CopyType  type = NOX::DeepCopy  )  const [virtual]

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

Implements NOX::Abstract::Vector.

Definition at line 202 of file NOX_Thyra_Vector.C.

Teuchos::RCP< NOX::Abstract::MultiVector > NOX::Thyra::Vector::createMultiVector ( const NOX::Abstract::Vector *const *  vecs,
int  numVecs,
NOX::CopyType  type = NOX::DeepCopy 
) const [virtual]

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.

Reimplemented from NOX::Abstract::Vector.

Definition at line 209 of file NOX_Thyra_Vector.C.

References NOX::DeepCopy, and thyraVec.

Teuchos::RCP< NOX::Abstract::MultiVector > NOX::Thyra::Vector::createMultiVector ( int  numVecs,
NOX::CopyType  type = NOX::DeepCopy 
) const [virtual]

Create a MultiVector with numVecs columns.

Reimplemented from NOX::Abstract::Vector.

Definition at line 241 of file NOX_Thyra_Vector.C.

References NOX::DeepCopy, and thyraVec.

double NOX::Thyra::Vector::norm ( NOX::Abstract::Vector::NormType  type = NOX::Abstract::Vector::TwoNorm  )  const [virtual]

double NOX::Thyra::Vector::norm ( const NOX::Abstract::Vector weights  )  const [virtual]

Weighted 2-Norm.

Implements NOX::Abstract::Vector.

Definition at line 280 of file NOX_Thyra_Vector.C.

References thyraVec.

double NOX::Thyra::Vector::innerProduct ( const NOX::Abstract::Vector y  )  const [virtual]

Inner product with y.

Implements NOX::Abstract::Vector.

Definition at line 289 of file NOX_Thyra_Vector.C.

References thyraVec.

int NOX::Thyra::Vector::length (  )  const [virtual]

Return the length of vector.

Implements NOX::Abstract::Vector.

Definition at line 298 of file NOX_Thyra_Vector.C.

References thyraVec.

void NOX::Thyra::Vector::print ( std::ostream &  stream  )  const [virtual]

Print the vector. To be used for debugging only.

Reimplemented from NOX::Abstract::Vector.

Definition at line 305 of file NOX_Thyra_Vector.C.

References thyraVec.


Member Data Documentation

Teuchos::RCP< ::Thyra::VectorBase<double> > NOX::Thyra::Vector::thyraVec [protected]

Pointer to Thyra vector owned by this object.

Definition at line 201 of file NOX_Thyra_Vector.H.

Referenced by abs(), createMultiVector(), getThyraRCPVector(), getThyraVector(), init(), innerProduct(), length(), norm(), print(), random(), reciprocal(), scale(), and update().


The documentation for this class was generated from the following files:

Generated on Wed Oct 21 14:28:49 2009 for Nonlinear Solver Project by  doxygen 1.5.9