Epetra Package Browser (Single Doxygen Collection)
Development
|
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer. More...
#include <Epetra_Vector.h>
Private Member Functions | |
int | ChangeValues (int NumEntries, int BlockOffset, const double *Values, const int *Indices, bool IndicesGlobal, bool SumInto) |
int | ChangeValues (int NumEntries, int BlockOffset, const double *Values, const long long *Indices, bool IndicesGlobal, bool SumInto) |
template<typename int_type > | |
int | TChangeValues (int NumEntries, int BlockOffset, const double *Values, const int_type *Indices, bool IndicesGlobal, bool SumInto) |
Constructors/destructors | |
Epetra_Vector (const Epetra_BlockMap &Map, bool zeroOut=true) | |
Basic Epetra_Vector constuctor. More... | |
Epetra_Vector (const Epetra_Vector &Source) | |
Epetra_Vector copy constructor. More... | |
Epetra_Vector (Epetra_DataAccess CV, const Epetra_BlockMap &Map, double *V) | |
Set vector values from user array. More... | |
Epetra_Vector (Epetra_DataAccess CV, const Epetra_MultiVector &Source, int Index) | |
Set vector values from a vector in an existing Epetra_MultiVector. More... | |
virtual | ~Epetra_Vector () |
Epetra_Vector destructor. More... | |
Post-construction modification routines | |
int | ReplaceGlobalValues (int NumEntries, const double *Values, const int *Indices) |
Replace values in a vector with a given indexed list of values, indices are in global index space. More... | |
int | ReplaceGlobalValues (int NumEntries, const double *Values, const long long *Indices) |
int | ReplaceMyValues (int NumEntries, const double *Values, const int *Indices) |
Replace values in a vector with a given indexed list of values, indices are in local index space. More... | |
int | SumIntoGlobalValues (int NumEntries, const double *Values, const int *Indices) |
Sum values into a vector with a given indexed list of values, indices are in global index space. More... | |
int | SumIntoMyValues (int NumEntries, const double *Values, const int *Indices) |
Sum values into a vector with a given indexed list of values, indices are in local index space. More... | |
int | ReplaceGlobalValues (int NumEntries, int BlockOffset, const double *Values, const int *Indices) |
Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space. More... | |
int | ReplaceMyValues (int NumEntries, int BlockOffset, const double *Values, const int *Indices) |
Replace values in a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space. More... | |
int | SumIntoGlobalValues (int NumEntries, int BlockOffset, const double *Values, const int *Indices) |
Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in global index space. More... | |
int | SumIntoMyValues (int NumEntries, int BlockOffset, const double *Values, const int *Indices) |
Sum values into a vector with a given indexed list of values at the specified BlockOffset, indices are in local index space. More... | |
Extraction methods | |
int | ExtractCopy (double *V) const |
Put vector values into user-provided array. More... | |
int | ExtractView (double **V) const |
Set user-provided address of V. More... | |
Overloaded operators | |
double & | operator[] (int index) |
Element access function. More... | |
const double & | operator[] (int index) const |
Element access function. More... | |
Expert-only unsupported methods | |
int | ResetView (double *Values_in) |
Reset the view of an existing vector to point to new user data. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Epetra_MultiVector | |
int | ReplaceMap (const Epetra_BlockMap &map) |
Replace map, only if new map has same point-structure as current map. More... | |
int | Reduce () |
Epetra_MultiVector (const Epetra_BlockMap &Map, int NumVectors, bool zeroOut=true) | |
Basic Epetra_MultiVector constuctor. More... | |
Epetra_MultiVector (const Epetra_MultiVector &Source) | |
Epetra_MultiVector copy constructor. More... | |
Epetra_MultiVector (Epetra_DataAccess CV, const Epetra_BlockMap &Map, double *A, int MyLDA, int NumVectors) | |
Set multi-vector values from two-dimensional array. More... | |
Epetra_MultiVector (Epetra_DataAccess CV, const Epetra_BlockMap &Map, double **ArrayOfPointers, int NumVectors) | |
Set multi-vector values from array of pointers. More... | |
Epetra_MultiVector (Epetra_DataAccess CV, const Epetra_MultiVector &Source, int *Indices, int NumVectors) | |
Set multi-vector values from list of vectors in an existing Epetra_MultiVector. More... | |
Epetra_MultiVector (Epetra_DataAccess CV, const Epetra_MultiVector &Source, int StartIndex, int NumVectors) | |
Set multi-vector values from range of vectors in an existing Epetra_MultiVector. More... | |
virtual | ~Epetra_MultiVector () |
Epetra_MultiVector destructor. More... | |
int | ReplaceGlobalValue (int GlobalRow, int VectorIndex, double ScalarValue) |
Replace current value at the specified (GlobalRow, VectorIndex) location with ScalarValue. More... | |
int | ReplaceGlobalValue (long long GlobalRow, int VectorIndex, double ScalarValue) |
int | ReplaceGlobalValue (int GlobalBlockRow, int BlockRowOffset, int VectorIndex, double ScalarValue) |
Replace current value at the specified (GlobalBlockRow, BlockRowOffset, VectorIndex) location with ScalarValue. More... | |
int | ReplaceGlobalValue (long long GlobalBlockRow, int BlockRowOffset, int VectorIndex, double ScalarValue) |
int | SumIntoGlobalValue (int GlobalRow, int VectorIndex, double ScalarValue) |
Adds ScalarValue to existing value at the specified (GlobalRow, VectorIndex) location. More... | |
int | SumIntoGlobalValue (long long GlobalRow, int VectorIndex, double ScalarValue) |
int | SumIntoGlobalValue (int GlobalBlockRow, int BlockRowOffset, int VectorIndex, double ScalarValue) |
Adds ScalarValue to existing value at the specified (GlobalBlockRow, BlockRowOffset, VectorIndex) location. More... | |
int | SumIntoGlobalValue (long long GlobalBlockRow, int BlockRowOffset, int VectorIndex, double ScalarValue) |
int | ReplaceMyValue (int MyRow, int VectorIndex, double ScalarValue) |
Replace current value at the specified (MyRow, VectorIndex) location with ScalarValue. More... | |
int | ReplaceMyValue (int MyBlockRow, int BlockRowOffset, int VectorIndex, double ScalarValue) |
Replace current value at the specified (MyBlockRow, BlockRowOffset, VectorIndex) location with ScalarValue. More... | |
int | SumIntoMyValue (int MyRow, int VectorIndex, double ScalarValue) |
Adds ScalarValue to existing value at the specified (MyRow, VectorIndex) location. More... | |
int | SumIntoMyValue (int MyBlockRow, int BlockRowOffset, int VectorIndex, double ScalarValue) |
Adds ScalarValue to existing value at the specified (MyBlockRow, BlockRowOffset, VectorIndex) location. More... | |
int | PutScalar (double ScalarConstant) |
Initialize all values in a multi-vector with constant value. More... | |
int | Random () |
Set multi-vector values to random numbers. More... | |
int | ExtractCopy (double *A, int MyLDA) const |
Put multi-vector values into user-provided two-dimensional array. More... | |
int | ExtractCopy (double **ArrayOfPointers) const |
Put multi-vector values into user-provided array of pointers. More... | |
int | ExtractView (double **A, int *MyLDA) const |
Set user-provided addresses of A and MyLDA. More... | |
int | ExtractView (double ***ArrayOfPointers) const |
Set user-provided addresses of ArrayOfPointers. More... | |
int | Dot (const Epetra_MultiVector &A, double *Result) const |
Computes dot product of each corresponding pair of vectors. More... | |
int | Abs (const Epetra_MultiVector &A) |
Puts element-wise absolute values of input Multi-vector in target. More... | |
int | Reciprocal (const Epetra_MultiVector &A) |
Puts element-wise reciprocal values of input Multi-vector in target. More... | |
int | Scale (double ScalarValue) |
Scale the current values of a multi-vector, this = ScalarValue*this. More... | |
int | Scale (double ScalarA, const Epetra_MultiVector &A) |
Replace multi-vector values with scaled values of A, this = ScalarA*A. More... | |
int | Update (double ScalarA, const Epetra_MultiVector &A, double ScalarThis) |
Update multi-vector values with scaled values of A, this = ScalarThis*this + ScalarA*A. More... | |
int | Update (double ScalarA, const Epetra_MultiVector &A, double ScalarB, const Epetra_MultiVector &B, double ScalarThis) |
Update multi-vector with scaled values of A and B, this = ScalarThis*this + ScalarA*A + ScalarB*B. More... | |
int | Norm1 (double *Result) const |
Compute 1-norm of each vector in multi-vector. More... | |
int | Norm2 (double *Result) const |
Compute 2-norm of each vector in multi-vector. More... | |
int | NormInf (double *Result) const |
Compute Inf-norm of each vector in multi-vector. More... | |
int | NormWeighted (const Epetra_MultiVector &Weights, double *Result) const |
Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector. More... | |
int | MinValue (double *Result) const |
Compute minimum value of each vector in multi-vector. More... | |
int | MaxValue (double *Result) const |
Compute maximum value of each vector in multi-vector. More... | |
int | MeanValue (double *Result) const |
Compute mean (average) value of each vector in multi-vector. More... | |
int | Multiply (char TransA, char TransB, double ScalarAB, const Epetra_MultiVector &A, const Epetra_MultiVector &B, double ScalarThis) |
Matrix-Matrix multiplication, this = ScalarThis*this + ScalarAB*A*B. More... | |
int | Multiply (double ScalarAB, const Epetra_MultiVector &A, const Epetra_MultiVector &B, double ScalarThis) |
Multiply a Epetra_MultiVector with another, element-by-element. More... | |
int | ReciprocalMultiply (double ScalarAB, const Epetra_MultiVector &A, const Epetra_MultiVector &B, double ScalarThis) |
Multiply a Epetra_MultiVector by the reciprocal of another, element-by-element. More... | |
int | SetSeed (unsigned int Seed_in) |
Set seed for Random function. More... | |
unsigned int | Seed () |
Get seed from Random function. More... | |
Epetra_MultiVector & | operator= (const Epetra_MultiVector &Source) |
= Operator. More... | |
double *& | operator[] (int i) |
Vector access function. More... | |
double *const & | operator[] (int i) const |
Vector access function. More... | |
Epetra_Vector *& | operator() (int i) |
Vector access function. More... | |
const Epetra_Vector *& | operator() (int i) const |
Vector access function. More... | |
int | NumVectors () const |
Returns the number of vectors in the multi-vector. More... | |
int | MyLength () const |
Returns the local vector length on the calling processor of vectors in the multi-vector. More... | |
int | GlobalLength () const |
Returns the global vector length of vectors in the multi-vector. More... | |
long long | GlobalLength64 () const |
Returns the 64-bit global vector length of vectors in the multi-vector. More... | |
int | Stride () const |
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true). More... | |
bool | ConstantStride () const |
Returns true if this multi-vector has constant stride between vectors. More... | |
virtual void | Print (std::ostream &os) const |
Print method. More... | |
int | ResetView (double **ArrayOfPointers) |
Reset the view of an existing multivector to point to new user data. More... | |
double * | Values () const |
Get pointer to MultiVector values. More... | |
double ** | Pointers () const |
Get pointer to individual vector pointers. More... | |
Public Member Functions inherited from Epetra_DistObject | |
Epetra_DistObject (const Epetra_BlockMap &Map) | |
Basic Epetra_DistObject constuctor. More... | |
Epetra_DistObject (const Epetra_BlockMap &Map, const char *const Label) | |
Epetra_DistObject (const Epetra_DistObject &Source) | |
Epetra_DistObject copy constructor. More... | |
virtual | ~Epetra_DistObject () |
Epetra_DistObject destructor. More... | |
int | Import (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Imports an Epetra_DistObject using the Epetra_Import object. More... | |
int | Import (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Imports an Epetra_DistObject using the Epetra_Export object. More... | |
int | Export (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Exports an Epetra_DistObject using the Epetra_Import object. More... | |
int | Export (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0) |
Exports an Epetra_DistObject using the Epetra_Export object. More... | |
const Epetra_BlockMap & | Map () const |
Returns the address of the Epetra_BlockMap for this multi-vector. More... | |
const Epetra_Comm & | Comm () const |
Returns the address of the Epetra_Comm for this multi-vector. More... | |
bool | DistributedGlobal () const |
Returns true if this multi-vector is distributed global, i.e., not local replicated. More... | |
Public Member Functions inherited from Epetra_Object | |
Epetra_Object (int TracebackModeIn=-1, bool set_label=true) | |
Epetra_Object Constructor. More... | |
Epetra_Object (const char *const Label, int TracebackModeIn=-1) | |
Epetra_Object Constructor. More... | |
Epetra_Object (const Epetra_Object &Object) | |
Epetra_Object Copy Constructor. More... | |
virtual | ~Epetra_Object () |
Epetra_Object Destructor. More... | |
virtual void | SetLabel (const char *const Label) |
Epetra_Object Label definition using char *. More... | |
virtual const char * | Label () const |
Epetra_Object Label access funtion. More... | |
virtual int | ReportError (const std::string Message, int ErrorCode) const |
Error reporting method. More... | |
Public Member Functions inherited from Epetra_SrcDistObject | |
virtual | ~Epetra_SrcDistObject () |
Epetra_SrcDistObject destructor. More... | |
Public Member Functions inherited from Epetra_CompObject | |
Epetra_CompObject & | operator= (const Epetra_CompObject &src) |
Epetra_CompObject () | |
Basic Epetra_CompObject constuctor. More... | |
Epetra_CompObject (const Epetra_CompObject &Source) | |
Epetra_CompObject copy constructor. More... | |
virtual | ~Epetra_CompObject () |
Epetra_CompObject destructor. More... | |
void | SetFlopCounter (const Epetra_Flops &FlopCounter_in) |
Set the internal Epetra_Flops() pointer. More... | |
void | SetFlopCounter (const Epetra_CompObject &CompObject) |
Set the internal Epetra_Flops() pointer to the flop counter of another Epetra_CompObject. More... | |
void | UnsetFlopCounter () |
Set the internal Epetra_Flops() pointer to 0 (no flops counted). More... | |
Epetra_Flops * | GetFlopCounter () const |
Get the pointer to the Epetra_Flops() object associated with this object, returns 0 if none. More... | |
void | ResetFlops () const |
Resets the number of floating point operations to zero for this multi-vector. More... | |
double | Flops () const |
Returns the number of floating point operations with this multi-vector. More... | |
void | UpdateFlops (int Flops_in) const |
Increment Flop count for this object. More... | |
void | UpdateFlops (long int Flops_in) const |
Increment Flop count for this object. More... | |
void | UpdateFlops (long long Flops_in) const |
Increment Flop count for this object. More... | |
void | UpdateFlops (double Flops_in) const |
Increment Flop count for this object. More... | |
void | UpdateFlops (float Flops_in) const |
Increment Flop count for this object. More... | |
Public Member Functions inherited from Epetra_BLAS | |
Epetra_BLAS (void) | |
Epetra_BLAS Constructor. More... | |
Epetra_BLAS (const Epetra_BLAS &BLAS) | |
Epetra_BLAS Copy Constructor. More... | |
virtual | ~Epetra_BLAS (void) |
Epetra_BLAS Destructor. More... | |
float | ASUM (const int N, const float *X, const int INCX=1) const |
Epetra_BLAS one norm function (SASUM). More... | |
double | ASUM (const int N, const double *X, const int INCX=1) const |
Epetra_BLAS one norm function (DASUM). More... | |
float | DOT (const int N, const float *X, const float *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS dot product function (SDOT). More... | |
double | DOT (const int N, const double *X, const double *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS dot product function (DDOT). More... | |
float | NRM2 (const int N, const float *X, const int INCX=1) const |
Epetra_BLAS norm function (SNRM2). More... | |
double | NRM2 (const int N, const double *X, const int INCX=1) const |
Epetra_BLAS norm function (DNRM2). More... | |
void | SCAL (const int N, const float ALPHA, float *X, const int INCX=1) const |
Epetra_BLAS vector scale function (SSCAL) More... | |
void | SCAL (const int N, const double ALPHA, double *X, const int INCX=1) const |
Epetra_BLAS vector scale function (DSCAL) More... | |
void | COPY (const int N, const float *X, float *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS vector copy function (SCOPY) More... | |
void | COPY (const int N, const double *X, double *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS vector scale function (DCOPY) More... | |
int | IAMAX (const int N, const float *X, const int INCX=1) const |
Epetra_BLAS arg maximum of absolute value function (ISAMAX) More... | |
int | IAMAX (const int N, const double *X, const int INCX=1) const |
Epetra_BLAS arg maximum of absolute value function (IDAMAX) More... | |
void | AXPY (const int N, const float ALPHA, const float *X, float *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS vector update function (SAXPY) More... | |
void | AXPY (const int N, const double ALPHA, const double *X, double *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS vector update function (DAXPY) More... | |
void | GEMV (const char TRANS, const int M, const int N, const float ALPHA, const float *A, const int LDA, const float *X, const float BETA, float *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS matrix-vector multiply function (SGEMV) More... | |
void | GEMV (const char TRANS, const int M, const int N, const double ALPHA, const double *A, const int LDA, const double *X, const double BETA, double *Y, const int INCX=1, const int INCY=1) const |
Epetra_BLAS matrix-vector multiply function (DGEMV) More... | |
void | GEMM (const char TRANSA, const char TRANSB, const int M, const int N, const int K, const float ALPHA, const float *A, const int LDA, const float *B, const int LDB, const float BETA, float *C, const int LDC) const |
Epetra_BLAS matrix-matrix multiply function (SGEMM) More... | |
void | GEMM (const char TRANSA, const char TRANSB, const int M, const int N, const int K, const double ALPHA, const double *A, const int LDA, const double *B, const int LDB, const double BETA, double *C, const int LDC) const |
Epetra_BLAS matrix-matrix multiply function (DGEMM) More... | |
void | SYMM (const char SIDE, const char UPLO, const int M, const int N, const float ALPHA, const float *A, const int LDA, const float *B, const int LDB, const float BETA, float *C, const int LDC) const |
Epetra_BLAS symmetric matrix-matrix multiply function (SSYMM) More... | |
void | SYMM (const char SIDE, const char UPLO, const int M, const int N, const double ALPHA, const double *A, const int LDA, const double *B, const int LDB, const double BETA, double *C, const int LDC) const |
Epetra_BLAS matrix-matrix multiply function (DSYMM) More... | |
void | TRMM (const char SIDE, const char UPLO, const char TRANSA, const char DIAG, const int M, const int N, const float ALPHA, const float *A, const int LDA, float *B, const int LDB) const |
Epetra_BLAS triangular matrix-matrix multiply function (STRMM) More... | |
void | TRMM (const char SIDE, const char UPLO, const char TRANSA, const char DIAG, const int M, const int N, const double ALPHA, const double *A, const int LDA, double *B, const int LDB) const |
Epetra_BLAS triangular matrix-matrix multiply function (DTRMM) More... | |
void | SYRK (const char UPLO, const char TRANS, const int N, const int K, const float ALPHA, const float *A, const int LDA, const float BETA, float *C, const int LDC) const |
Eperta_BLAS symetric rank k funtion (ssyrk) More... | |
void | SYRK (const char UPLO, const char TRANS, const int N, const int K, const double ALPHA, const double *A, const int LDA, const double BETA, double *C, const int LDC) const |
Eperta_BLAS symetric rank k funtion (dsyrk) More... | |
Static Public Member Functions inherited from Epetra_Object | |
static void | SetTracebackMode (int TracebackModeValue) |
Set the value of the Epetra_Object error traceback report mode. More... | |
static int | GetTracebackMode () |
Get the value of the Epetra_Object error report mode. More... | |
static std::ostream & | GetTracebackStream () |
Get the output stream for error reporting. More... | |
Static Public Attributes inherited from Epetra_Object | |
static int | TracebackMode |
Protected Member Functions inherited from Epetra_MultiVector | |
void | Assign (const Epetra_MultiVector &rhs) |
int | CheckInput () |
Protected Member Functions inherited from Epetra_DistObject | |
virtual int | DoTransfer (const Epetra_SrcDistObject &A, Epetra_CombineMode CombineMode, int NumSameIDs, int NumPermuteIDs, int NumRemoteIDs, int NumExportIDs, int *PermuteToLIDs, int *PermuteFromLIDs, int *RemoteLIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &LenImports, char *&Imports, Epetra_Distributor &Distor, bool DoReverse, const Epetra_OffsetIndex *Indexor) |
Perform actual transfer (redistribution) of data across memory images, using Epetra_Distributor object. More... | |
Protected Member Functions inherited from Epetra_Object | |
std::string | toString (const int &x) const |
std::string | toString (const long long &x) const |
std::string | toString (const double &x) const |
Protected Attributes inherited from Epetra_MultiVector | |
double * | Values_ |
Protected Attributes inherited from Epetra_DistObject | |
Epetra_BlockMap | Map_ |
const Epetra_Comm * | Comm_ |
char * | Exports_ |
char * | Imports_ |
int | LenExports_ |
int | LenImports_ |
int * | Sizes_ |
Protected Attributes inherited from Epetra_CompObject | |
Epetra_Flops * | FlopCounter_ |
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.
The Epetra_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 Epetra_MultiVector class. As such, it has full access to all of the functionality provided in the Epetra_MultiVector class.
Distributed Global vs. Replicated Local
Constructing Epetra_Vectors
There are four Epetra_Vector constructors. The first is a basic constructor that allocates space and sets all values to zero, the second is a copy constructor. The third and fourth constructors work with user data. These constructors have two data access modes:
All Epetra_Vector constructors require a map argument that describes the layout of elements on the parallel machine. Specifically, map
is a Epetra_Map, Epetra_LocalMap or Epetra_BlockMap object describing the desired memory layout for the vector.
There are four different Epetra_Vector constructors:
Extracting Data from Epetra_Vectors
Once a Epetra_Vector is constructed, it is possible to extract a copy of the values or create a view of them.
There are two Extract functions:
Vector and Utility Functions
Once a Epetra_Vector is constructed, a variety of mathematical functions can be applied to the vector. Specifically:
The final useful function is Flops(). Each Epetra_Vector object keep track of the number of serial floating point operations performed using the specified object as the this argument to the function. The Flops() function returns this number as a double precision number. Using this information, in conjunction with the Epetra_Time class, one can get accurate parallel performance numbers.
Definition at line 150 of file Epetra_Vector.h.
Epetra_Vector::Epetra_Vector | ( | const Epetra_BlockMap & | Map, |
bool | zeroOut = true |
||
) |
Basic Epetra_Vector constuctor.
Creates a Epetra_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 initialy. If false then this memory will not be touched which can be significantly faster. |
Definition at line 48 of file Epetra_Vector.cpp.
Epetra_Vector::Epetra_Vector | ( | const Epetra_Vector & | Source | ) |
Epetra_Vector copy constructor.
Definition at line 54 of file Epetra_Vector.cpp.
Epetra_Vector::Epetra_Vector | ( | Epetra_DataAccess | CV, |
const Epetra_BlockMap & | Map, | ||
double * | V | ||
) |
Set vector values from user array.
In | Epetra_DataAccess - Enumerated type set to Copy or View. |
In | Map - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap. |
In | V - Pointer to an array of double precision numbers.. |
See Detailed Description section for further discussion.
Definition at line 59 of file Epetra_Vector.cpp.
Epetra_Vector::Epetra_Vector | ( | Epetra_DataAccess | CV, |
const Epetra_MultiVector & | Source, | ||
int | Index | ||
) |
Set vector values from a vector in an existing Epetra_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 Epetra_MultiVector. |
In | Index - Index of vector to access. |
See Detailed Description section for further discussion.
Definition at line 65 of file Epetra_Vector.cpp.
|
virtual |
Epetra_Vector destructor.
Definition at line 71 of file Epetra_Vector.cpp.
int Epetra_Vector::ReplaceGlobalValues | ( | int | NumEntries, |
const double * | Values, | ||
const 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. |
Definition at line 100 of file Epetra_Vector.cpp.
int Epetra_Vector::ReplaceGlobalValues | ( | int | NumEntries, |
const double * | Values, | ||
const long long * | Indices | ||
) |
Definition at line 107 of file Epetra_Vector.cpp.
int Epetra_Vector::ReplaceMyValues | ( | int | NumEntries, |
const double * | Values, | ||
const 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. |
Definition at line 114 of file Epetra_Vector.cpp.
int Epetra_Vector::SumIntoGlobalValues | ( | int | NumEntries, |
const double * | Values, | ||
const 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 replace existing values in vector, of length NumEntries. |
In | Indices - Indices in global index space corresponding to Values. |
Definition at line 120 of file Epetra_Vector.cpp.
int Epetra_Vector::SumIntoMyValues | ( | int | NumEntries, |
const double * | Values, | ||
const 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 replace existing values in vector, of length NumEntries. |
In | Indices - Indices in local index space corresponding to Values. |
Definition at line 126 of file Epetra_Vector.cpp.
int Epetra_Vector::ReplaceGlobalValues | ( | int | NumEntries, |
int | BlockOffset, | ||
const double * | Values, | ||
const 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. |
Definition at line 132 of file Epetra_Vector.cpp.
int Epetra_Vector::ReplaceMyValues | ( | int | NumEntries, |
int | BlockOffset, | ||
const double * | Values, | ||
const 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. |
Definition at line 138 of file Epetra_Vector.cpp.
int Epetra_Vector::SumIntoGlobalValues | ( | int | NumEntries, |
int | BlockOffset, | ||
const double * | Values, | ||
const 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 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. |
Definition at line 144 of file Epetra_Vector.cpp.
int Epetra_Vector::SumIntoMyValues | ( | int | NumEntries, |
int | BlockOffset, | ||
const double * | Values, | ||
const 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 replace existing values in vector, of length NumEntries. |
In | Indices - Indices in local index space corresponding to Values. |
Definition at line 150 of file Epetra_Vector.cpp.
int Epetra_Vector::ExtractCopy | ( | double * | V | ) | const |
Put vector values into user-provided array.
Out | V - Pointer to memory space that will contain the vector values. |
Definition at line 74 of file Epetra_Vector.cpp.
int Epetra_Vector::ExtractView | ( | double ** | V | ) | const |
Set user-provided address of V.
Out | V - Address of a pointer to that will be set to point to the values of the vector. |
Definition at line 79 of file Epetra_Vector.cpp.
|
inline |
|
inline |
|
inline |
Reset the view of an existing vector to point to new user data.
Allows the (very) light-weight replacement of multivector values for an existing vector that was constructed using an Epetra_DataAccess mode of View. No checking is performed to see if the values passed in contain valid data. It is assumed that the user has verified the integrity of data before calling this method. This method is useful for situations where a vector is needed for use with an Epetra operator or matrix and the user is not passing in a multivector, or the multivector is being passed in with another map that is not exactly compatible with the operator, but has the correct number of entries.
This method is used by AztecOO and Ifpack in the matvec and solve methods to improve performance and reduce repeated calls to constructors and destructors.
Values | Vector data. |
Definition at line 468 of file Epetra_Vector.h.
|
private |
Definition at line 186 of file Epetra_Vector.cpp.
|
private |
Definition at line 195 of file Epetra_Vector.cpp.
|
private |
Definition at line 157 of file Epetra_Vector.cpp.