#include <Komplex_Vector.hpp>
Inheritance diagram for Komplex_Vector:


Public Member Functions | |
| Komplex_Vector (const Epetra_BlockMap &Map, bool zeroOut=true) | |
| Basic Komplex_Vector constuctor. | |
| Komplex_Vector (const Epetra_BlockMap &Map, const Epetra_Vector &br, const Epetra_Vector &bi) | |
| General Komplex_Vector constructor. | |
| Komplex_Vector (const Komplex_Vector &Source) | |
| Komplex_Vector copy constructor. | |
| Komplex_Vector (Epetra_DataAccess CV, const Epetra_BlockMap &Map, const Komplex_MultiVector &Source, int Index) | |
| Set vector values from a vector in an existing Komplex_MultiVector. | |
| virtual | ~Komplex_Vector () |
| Komplex_Vector destructor. | |
| int | ReplaceGlobalValues (int NumEntries, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values, indices are in global index space. | |
| int | ReplaceMyValues (int NumEntries, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values, indices are in local index space. | |
| int | SumIntoGlobalValues (int NumEntries, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values, indices are in global index space. | |
| int | SumIntoMyValues (int NumEntries, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values, indices are in local index space. | |
| int | ReplaceGlobalValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space. | |
| int | ReplaceMyValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space. | |
| int | SumIntoGlobalValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space. | |
| int | SumIntoMyValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space. | |
| int | Scale (double ScalarValue) |
| Scale the current values of the this vector, this = ScalarValue*this. | |
| int | Scale (double ScalarA, const Komplex_Vector &A) |
| Replace vector values with scaled values of A, this = ScalarA*A. | |
| int | Norm1 (double &Result) const |
| Compute 1-norm of the this vector. | |
| int | Norm2 (double &Result) const |
| Compute 2-norm of the this vector. | |
| int | NormInf (double &Result) const |
| Compute Inf-norm of the this vector. | |
| Komplex_Vector & | operator= (const Komplex_Vector &Source) |
| = Operator. | |
| double & | operator[] (int index) |
| Element access function. | |
| const double & | operator[] (int index) const |
| Element access function. | |
| int | Length () const |
| Returns the length of the vector. | |
| int | ReplaceMap (const Epetra_BlockMap &map) |
| void | Print (ostream &os) const |
| Print method. | |
| Komplex_Vector (const Epetra_BlockMap &Map, bool zeroOut=true) | |
| Basic Komplex_Vector constuctor. | |
| Komplex_Vector (const Epetra_BlockMap &Map, const Epetra_Vector &br, const Epetra_Vector &bi) | |
| General Komplex_Vector constructor. | |
| Komplex_Vector (const Komplex_Vector &Source) | |
| Komplex_Vector copy constructor. | |
| Komplex_Vector (Komplex_DataAccess CV, const Epetra_BlockMap &Map, const Komplex_MultiVector &Source, int Index) | |
| Set vector values from a vector in an existing Komplex_MultiVector. | |
| virtual | ~Komplex_Vector () |
| Komplex_Vector destructor. | |
| int | ReplaceGlobalValues (int NumEntries, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values, indices are in global index space. | |
| int | ReplaceMyValues (int NumEntries, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values, indices are in local index space. | |
| int | SumIntoGlobalValues (int NumEntries, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values, indices are in global index space. | |
| int | SumIntoMyValues (int NumEntries, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values, indices are in local index space. | |
| int | ReplaceGlobalValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space. | |
| int | ReplaceMyValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space. | |
| int | SumIntoGlobalValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space. | |
| int | SumIntoMyValues (int NumEntries, int BlockOffset, double *Values, int *Indices) |
| Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space. | |
| int | Scale (double ScalarValue) |
| Scale the current values of the this vector, this = ScalarValue*this. | |
| int | Scale (double ScalarA, const Komplex_Vector &A) |
| Replace vector values with scaled values of A, this = ScalarA*A. | |
| int | Norm1 (double &Result) const |
| Compute 1-norm of the this vector. | |
| int | Norm2 (double &Result) const |
| Compute 2-norm of the this vector. | |
| int | NormInf (double &Result) const |
| Compute Inf-norm of the this vector. | |
| Komplex_Vector & | operator= (const Komplex_Vector &Source) |
| = Operator. | |
| double & | operator[] (int index) |
| Element access function. | |
| const double & | operator[] (int index) const |
| Element access function. | |
| int | Length () const |
| Returns the length of the vector. | |
| int | ReplaceMap (const Epetra_BlockMap &map) |
| void | Print (ostream &os) const |
| Print method. | |
The Komplex_Vector class enables the construction and use of real-valued, double-precision dense vectors in a distributed memory environment. The distribution of the dense vector is determined in part by a Epetra_Comm object and a Epetra_Map (or Epetra_LocalMap or Epetra_BlockMap).
This class is derived from the Komplex_MultiVector class. As such, it has full access to all of the functionality provided in the Komplex_MultiVector class.
Distributed Global vs. Replicated Local
Constructing Komplex_Vectors
There are four Komplex_Vector constructors. The first is a basic constructor that allocates space and sets all values to zero, the second is a general constructor, the first is a copy constructor, and the fourth works with user data. This constructor has two data access modes:
map is a Epetra_Map, Epetra_LocalMap or Epetra_BlockMap object describing the desired memory layout for the vector.There are four different Komplex_Vector constructors:
Vector and Utility Functions
Once a Komplex_Vector is constructed, a variety of mathematical functions can be applied to the vector. Specifically:
| Komplex_Vector::Komplex_Vector | ( | const Epetra_BlockMap & | Map, | |
| bool | zeroOut = true | |||
| ) |
Basic Komplex_Vector constuctor.
Creates a Komplex_Vector object and fills with zero values.
| In | Map - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap. | |
| In | zeroOut - If true then the allocated memory will be zeroed out initially. If false then this memory will not be touched, which can be significantly faster. |
| Komplex_Vector::Komplex_Vector | ( | const Epetra_BlockMap & | Map, | |
| const Epetra_Vector & | br, | |||
| const Epetra_Vector & | bi | |||
| ) |
General Komplex_Vector constructor.
| In | Map - A Epetra_LocalMap, Epetra_Map, or Epetra_BlockMap | |
| In | br - A Epetra_Vector containing the real parts of the complex vector In bi - A Epetra_Vector containing the imaginary parts of the complex vector |
| Komplex_Vector::Komplex_Vector | ( | Epetra_DataAccess | CV, | |
| const Epetra_BlockMap & | Map, | |||
| const Komplex_MultiVector & | Source, | |||
| int | Index | |||
| ) |
Set vector values from a vector in an existing Komplex_MultiVector.
| In | Epetra_DataAccess - Enumerated type set to Copy or View. | |
| In | Map - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap. | |
| In | Source - An existing fully constructed Komplex_MultiVector. | |
| In | Index - Index of vector to access. |
| Komplex_Vector::Komplex_Vector | ( | const Epetra_BlockMap & | Map, | |
| bool | zeroOut = true | |||
| ) |
Basic Komplex_Vector constuctor.
Creates a Komplex_Vector object and fills with zero values.
| In | Map - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap. | |
| In | zeroOut - If true then the allocated memory will be zeroed out initially. If false then this memory will not be touched, which can be significantly faster. |
| Komplex_Vector::Komplex_Vector | ( | const Epetra_BlockMap & | Map, | |
| const Epetra_Vector & | br, | |||
| const Epetra_Vector & | bi | |||
| ) |
General Komplex_Vector constructor.
| In | Map - A Epetra_LocalMap, Epetra_Map, or Epetra_BlockMap | |
| In | br - A Epetra_Vector containing the real parts of the complex vector In bi - A Epetra_Vector containing the imaginary parts of the complex vector |
| Komplex_Vector::Komplex_Vector | ( | Komplex_DataAccess | CV, | |
| const Epetra_BlockMap & | Map, | |||
| const Komplex_MultiVector & | Source, | |||
| int | Index | |||
| ) |
Set vector values from a vector in an existing Komplex_MultiVector.
| In | Epetra_DataAccess - Enumerated type set to Copy or View. | |
| In | Map - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap. | |
| In | Source - An existing fully constructed Komplex_MultiVector. | |
| In | Index - Index of vector to access. |
| int Komplex_Vector::Norm1 | ( | double & | Result | ) | const |
Compute 1-norm of the this vector.
| Out | Result - Result contains 1-norm of the this vector. |
| int Komplex_Vector::Norm1 | ( | double & | Result | ) | const |
Compute 1-norm of the this vector.
| Out | Result - Result contains 1-norm of the this vector. |
| int Komplex_Vector::Norm2 | ( | double & | Result | ) | const |
Compute 2-norm of the this vector.
| Out | Result - Result contains 2-norm of the this vector. |
| int Komplex_Vector::Norm2 | ( | double & | Result | ) | const |
Compute 2-norm of the this vector.
| Out | Result - Result contains 2-norm of the this vector. |
| int Komplex_Vector::NormInf | ( | double & | Result | ) | const |
Compute Inf-norm of the this vector.
| Out | Result - Result contains Inf-norm of the this vector. |
| int Komplex_Vector::NormInf | ( | double & | Result | ) | const |
Compute Inf-norm of the this vector.
| Out | Result - Result contains Inf-norm of the this vector. |
| Komplex_Vector& Komplex_Vector::operator= | ( | const Komplex_Vector & | Source | ) |
| Komplex_Vector & Komplex_Vector::operator= | ( | const Komplex_Vector & | Source | ) |
| const double& Komplex_Vector::operator[] | ( | int | index | ) | const |
| double& Komplex_Vector::operator[] | ( | int | index | ) |
| const double & Komplex_Vector::operator[] | ( | int | index | ) | const |
| double & Komplex_Vector::operator[] | ( | int | index | ) |
| int Komplex_Vector::ReplaceGlobalValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space.
Replace the Indices[i] entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in global index space. This method is intended for vector that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::ReplaceGlobalValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values, indices are in global index space.
Replace the Indices[i] entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in global index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::ReplaceGlobalValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space.
Replace the Indices[i] entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in global index space. This method is intended for vector that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::ReplaceGlobalValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values, indices are in global index space.
Replace the Indices[i] entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in global index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::ReplaceMap | ( | const Epetra_BlockMap & | map | ) |
Replace map, only if new map has same point-structure as current map. return 0 if map is replaced, -1 if not.
Reimplemented from Komplex_MultiVector.
| int Komplex_Vector::ReplaceMap | ( | const Epetra_BlockMap & | map | ) |
Replace map, only if new map has same point-structure as current map. return 0 if map is replaced, -1 if not.
Reimplemented from Komplex_MultiVector.
| int Komplex_Vector::ReplaceMyValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space.
Replace the (Indices[i], BlockOffset) entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in local index space. This method is intended for vector that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
| int Komplex_Vector::ReplaceMyValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values, indices are in local index space.
Replace the Indices[i] entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in local index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
| int Komplex_Vector::ReplaceMyValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space.
Replace the (Indices[i], BlockOffset) entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in local index space. This method is intended for vector that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
| int Komplex_Vector::ReplaceMyValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Replace values in a vector with a given indexed list of values, indices are in local index space.
Replace the Indices[i] entry in the this object with Values[i], for i=0; i<NumEntries. The indices are in local index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
| int Komplex_Vector::Scale | ( | double | ScalarA, | |
| const Komplex_Vector & | A | |||
| ) |
Replace vector values with scaled values of A, this = ScalarA*A.
| In | ScalarA - Scale value. | |
| In | A - Vector to copy. | |
| Out | This - Vector with values overwritten by scaled values of A. |
| int Komplex_Vector::Scale | ( | double | ScalarValue | ) |
Scale the current values of the this vector, this = ScalarValue*this.
| In | ScalarValue - Scale value. | |
| Out | This - Vector with scaled values. |
Reimplemented from Komplex_MultiVector.
| int Komplex_Vector::Scale | ( | double | ScalarA, | |
| const Komplex_Vector & | A | |||
| ) |
Replace vector values with scaled values of A, this = ScalarA*A.
| In | ScalarA - Scale value. | |
| In | A - Vector to copy. | |
| Out | This - Vector with values overwritten by scaled values of A. |
| int Komplex_Vector::Scale | ( | double | ScalarValue | ) |
Scale the current values of the this vector, this = ScalarValue*this.
| In | ScalarValue - Scale value. | |
| Out | This - Vector with scaled values. |
Reimplemented from Komplex_MultiVector.
| int Komplex_Vector::SumIntoGlobalValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in global index space. This method is intended for vectors that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::SumIntoGlobalValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values, indices are in global index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in global index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will be added to existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::SumIntoGlobalValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in global index space. This method is intended for vectors that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will replace existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::SumIntoGlobalValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values, indices are in global index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in global index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will be added to existing values in vector, of length NumEntries. | |
| In | Indices - Indices in global index space corresponding to Values. |
| int Komplex_Vector::SumIntoMyValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in local index space. This method is intended for vector that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will be added to existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
| int Komplex_Vector::SumIntoMyValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values, indices are in local index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in local index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will be added to existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
| int Komplex_Vector::SumIntoMyValues | ( | int | NumEntries, | |
| int | BlockOffset, | |||
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in local index space. This method is intended for vector that are defined using block maps. In this situation, an index value is associated with one or more vector entries, depending on the element size of the given index. The BlockOffset argument indicates which vector entry to modify as an offset from the first vector entry associated with the given index. The offset is used for each entry in the input list.
| In | NumEntries - Number of vector entries to modify. | |
| In | BlockOffset - Offset from the first vector entry associated with each of the given indices. | |
| In | Values - Values which will be added to existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
| int Komplex_Vector::SumIntoMyValues | ( | int | NumEntries, | |
| double * | Values, | |||
| int * | Indices | |||
| ) |
Sum values into a vector with a given indexed list of values, indices are in local index space.
Sum Values[i] into the Indices[i] entry in the this object, for i=0; i<NumEntries. The indices are in local index space.
| In | NumEntries - Number of vector entries to modify. | |
| In | Values - Values which will be added to existing values in vector, of length NumEntries. | |
| In | Indices - Indices in local index space corresponding to Values. |
1.4.7