NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
LOCA::Hopf::ComplexVector Class Reference

Vector class to hold two vectors to represent a complex vector. More...

#include <LOCA_Hopf_ComplexVector.H>

Inheritance diagram for LOCA::Hopf::ComplexVector:
Inheritance graph
[legend]
Collaboration diagram for LOCA::Hopf::ComplexVector:
Collaboration graph
[legend]

Public Member Functions

 ComplexVector (const Teuchos::RCP< LOCA::GlobalData > &global_data, const NOX::Abstract::Vector &realVec, const NOX::Abstract::Vector &imagVec)
 Constructor.
 
 ComplexVector (const ComplexVector &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
 
virtual ~ComplexVector ()
 Destructor.
 
virtual NOX::Abstract::Vectoroperator= (const NOX::Abstract::Vector &y)
 Assignment operator.
 
virtual LOCA::Extended::Vectoroperator= (const LOCA::Extended::Vector &y)
 Assignment operator.
 
virtual ComplexVectoroperator= (const ComplexVector &y)
 Assignment operator.
 
virtual Teuchos::RCP
< NOX::Abstract::Vector
clone (NOX::CopyType type=NOX::DeepCopy) const
 Cloning function.
 
virtual void setVec (const NOX::Abstract::Vector &realVec, const NOX::Abstract::Vector &imagVec)
 Sets the vector by setting its components.
 
virtual Teuchos::RCP< const
NOX::Abstract::Vector
getRealVec () const
 Returns the real component of extended vector.
 
virtual Teuchos::RCP< const
NOX::Abstract::Vector
getImagVec () const
 Returns the imaginary component of extended vector.
 
virtual Teuchos::RCP
< NOX::Abstract::Vector
getRealVec ()
 Returns the real component of extended vector.
 
virtual Teuchos::RCP
< NOX::Abstract::Vector
getImagVec ()
 Returns the imaginary component of extended vector.
 
- Public Member Functions inherited from LOCA::Extended::Vector
 Vector (const Vector &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
 
virtual ~Vector ()
 Vector destructor.
 
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.
 
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 innerProduct (const NOX::Abstract::Vector &y) const
 NOX::Abstract::Vector innerProduct function. Computes inner product * of each stored vector and combines to compute inner product.
 
virtual NOX::size_type length () const
 NOX::Abstract::Vector length function. Computes sum of lengths of stored vectors plus number of scalars.
 
virtual void print (std::ostream &stream) 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, const Teuchos::RCP< 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 Teuchos::RCP< const
NOX::Abstract::Vector
getVector (int i) const
 Returns const ref-count pointer to the ith vector.
 
virtual Teuchos::RCP
< NOX::Abstract::Vector
getVector (int i)
 Returns ref-count pointer 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 Teuchos::RCP< const
NOX::Abstract::MultiVector::DenseMatrix
getScalars () const
 Returns array of scalars.
 
virtual Teuchos::RCP
< NOX::Abstract::MultiVector::DenseMatrix
getScalars ()
 Returns array of scalars.
 
virtual int getNumScalars () const
 Returns number of scalars.
 
virtual int getNumVectors () const
 Returns number of vectors.
 
- Public Member Functions inherited from NOX::Abstract::Vector
 Vector ()
 Abstract Vector constructor (does nothing)
 

Protected Member Functions

 ComplexVector (const Teuchos::RCP< LOCA::GlobalData > &global_data)
 Default Constructor.
 
virtual Teuchos::RCP
< LOCA::Extended::MultiVector
generateMultiVector (int nColumns, int nVectorRows, int nScalarRows) const
 generate an extended multi-vector More...
 
- Protected Member Functions inherited from LOCA::Extended::Vector
 Vector (const Teuchos::RCP< LOCA::GlobalData > &global_data, int nvecs, int nscalars)
 Vector constructor.
 

Friends

class ComplexMultiVector
 Declare LOCA::Hopf::ComplexMultiVector as a friend class so it can call protected methods.
 

Additional Inherited Members

- Public Types inherited from NOX::Abstract::Vector
enum  NormType { TwoNorm, OneNorm, MaxNorm }
 Norm types used in norm() calculations. More...
 
- Protected Attributes inherited from LOCA::Extended::Vector
Teuchos::RCP< LOCA::GlobalDataglobalData
 Global data.
 
std::vector< Teuchos::RCP
< NOX::Abstract::Vector > > 
vectorPtrs
 Array of vector pointers.
 
std::vector< bool > isView
 Array indicating if each vector is a view.
 
int numScalars
 Number of scalars.
 
Teuchos::RCP
< NOX::Abstract::MultiVector::DenseMatrix
scalarsPtr
 Scalars.
 

Detailed Description

Vector class to hold two vectors to represent a complex vector.

This is not a true complex vector. Operations like innerProduct() are not correct for complex vectors. This class exists to make some aspects of the real-equivalent formulation of complex linear algebra simpler to implement.

Member Function Documentation

Teuchos::RCP< LOCA::Extended::MultiVector > LOCA::Hopf::ComplexVector::generateMultiVector ( int  nColumns,
int  nVectorRows,
int  nScalarRows 
) const
protectedvirtual

generate an extended multi-vector

Returns an empty multivector of type LOCA::Hopf::ComplexMultiVector

Reimplemented from LOCA::Extended::Vector.

References Teuchos::rcp().


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