LOCA::Extended::Vector Class Reference

Implemenatation of the NOX::Abstract::Vector class for extended vectors comprised of an arbitrary number of vectors and scalars. More...

#include <LOCA_Extended_Vector.H>

Inheritance diagram for LOCA::Extended::Vector:

[legend]
Collaboration diagram for LOCA::Extended::Vector:
[legend]
List of all members.

Public Member Functions

 Vector (const vector< NOX::Abstract::Vector * > vv, const vector< double > vs)
 Vector constructor.
 Vector (const Vector &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
virtual ~Vector ()
 Vector destructor.
virtual NOX::Abstract::Vectoroperator= (const NOX::Abstract::Vector &y)
 Assignment operator.
virtual Vectoroperator= (const Vector &y)
 Assignment operator.
virtual NOX::Abstract::Vectorclone (NOX::CopyType type=NOX::DeepCopy) const
 Clone function. Applies clone to each stored vector.
virtual NOX::Abstract::MultiVectorcreateMultiVector (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 NOX::Abstract::MultiVectorcreateMultiVector (int numVecs, NOX::CopyType type=NOX::DeepCopy) const
 Create a MultiVector with numVecs columns.
virtual NOX::Abstract::Vectorinit (double gamma)
 NOX::Abstract::Vector init function. Initializes each stored vector and scalar.
virtual NOX::Abstract::Vectorrandom (bool useSeed=false, int seed=1)
 Initialize every element of this vector with random values.
virtual NOX::Abstract::Vectorabs (const NOX::Abstract::Vector &y)
 NOX::Abstract::Vector abs function. Compues absolute value of each stored vector and scalar.
virtual NOX::Abstract::Vectorreciprocal (const NOX::Abstract::Vector &y)
 NOX::Abstract::Vector reciprocal function. Computes reciprocal of each stored vector and scalar.
virtual NOX::Abstract::Vectorscale (double gamma)
 NOX::Abstract::Vector scale function. Scales each stored vector and scalar.
virtual NOX::Abstract::Vectorscale (const NOX::Abstract::Vector &a)
 NOX::Abstract::Vector scale function. Scales each stored vector and scalar.
virtual NOX::Abstract::Vectorupdate (double alpha, const NOX::Abstract::Vector &a, double gamma=0.0)
 NOX::Abstract::Vector update function. Applies vector update to each stored vector and scalar.
virtual NOX::Abstract::Vectorupdate (double alpha, const NOX::Abstract::Vector &a, double beta, const NOX::Abstract::Vector &b, double gamma=0.0)
 NOX::Abstract::Vector update function. Applies vector update to each stored vector and scalar.
virtual double norm (NormType type=TwoNorm) const
 NOX::Abstract::Vector norm function. Computes norm of each stored vector and combines to compute appropriate norm.
virtual double norm (const NOX::Abstract::Vector &weights) const
 NOX::Abstract::Vector weighted norm function. Computes weighted norm of each stored vector and combines to compute appropriate norm.
virtual double dot (const NOX::Abstract::Vector &y) const
 NOX::Abstract::Vector dot function. Computes dot product of each stored vector and combines to compute dot product.
virtual int length () const
 NOX::Abstract::Vector length function. Computes sum of lengths of stored vectors plus number of scalars.
virtual void print () const
 NOX::Abstract::Vector print function. For debugging purposes.
virtual void setVector (int i, const NOX::Abstract::Vector &v)
 Sets the ith vector.
virtual void setVectorView (int i, NOX::Abstract::Vector &v)
 Sets the ith vector as a view.
virtual void setScalar (int i, double s)
 Sets the ith scalar.
virtual void setScalarArray (double *sv)
 Sets the scalar array.
virtual const NOX::Abstract::VectorgetVector (int i) const
 Returns const reference to the ith vector.
virtual NOX::Abstract::VectorgetVector (int i)
 Returns reference to the ith vector.
virtual double getScalar (int i) const
 Returns copy of the ith scalar.
virtual double & getScalar (int i)
 Returns reference to the ith scalar.
virtual const NOX::Abstract::MultiVector::DenseMatrixgetScalars () const
 Returns array of scalars.
virtual NOX::Abstract::MultiVector::DenseMatrixgetScalars ()
 Returns array of scalars.
virtual int getNumScalars () const
 Returns number of scalars.
virtual int getNumVectors () const
 Returns number of vectors.

Protected Member Functions

 Vector (int nvecs, int nscalars)
 Vector constructor.
virtual LOCA::Extended::MultiVectorgenerateMultiVector (int nColumns, int nVectorRows, int nScalarRows) const
 generate an extended multi-vector

Protected Attributes

vector< NOX::Abstract::Vector * > vectorPtrs
 Array of vector pointers.
vector< bool > isView
 Array indicating if each vector is a view.
int numScalars
 Number of scalars.
NOX::Abstract::MultiVector::DenseMatrixscalarsPtr
 Scalars.

Friends

class LOCA::Extended::MultiVector
 Declare LOCA::Extended::MultiVector as a friend class.

Detailed Description

Implemenatation of the NOX::Abstract::Vector class for extended vectors comprised of an arbitrary number of vectors and scalars.

Many continuation and bifurcation calculations can be viewed as the solution to an extended set of equations. For example, calculating a turning point can be viewed as computing a solution to $G(z) = 0$ where $z = [x, n, p]\in\Re^{2n+1}$ and

\[ G(z) = \left[ \begin{array}{c} F(x,p) \\ Jn \\ n^Tn-1 \end{array} \right] \]

The extended vector $z$ is comprised of the two vectors $x$ and $n$ as well as the scalar $p$. This class provides an implementation of the NOX::Abstract::Vector interface for such extended vectors. It stores an array of pointers to NOX::Abstract::Vector's as well as an array of scalars using the STL vector class.

The implementations of the NOX::Abstract::Vector methods are defined in terms of the implementations of each stored abstract vector.


Member Function Documentation

LOCA::Extended::MultiVector * LOCA::Extended::Vector::generateMultiVector int  nColumns,
int  nVectorRows,
int  nScalarRows
const [protected, virtual]
 

generate an extended multi-vector

Extended vectors derived from this class should implement this method and return a multivector of the appropriate type so that the createMultiVectors method returns a multivector of the appropriate type.

Reimplemented in LOCA::MultiContinuation::ExtendedVector, and LOCA::TurningPoint::MooreSpence::ExtendedVector.


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