#include <Epetra_Vector.h>
Inheritance diagram for Epetra_Vector:
Constructors/destructors  
Epetra_Vector (const Epetra_BlockMap &Map, bool zeroOut=true)  
Basic Epetra_Vector constuctor.  
Epetra_Vector (const Epetra_Vector &Source)  
Epetra_Vector copy constructor.  
Epetra_Vector (Epetra_DataAccess CV, const Epetra_BlockMap &Map, double *V)  
Set vector values from user array.  
Epetra_Vector (Epetra_DataAccess CV, const Epetra_MultiVector &Source, int Index)  
Set vector values from a vector in an existing Epetra_MultiVector.  
virtual  ~Epetra_Vector () 
Epetra_Vector destructor.  
Postconstruction modification routines  
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.  
Extraction methods  
int  ExtractCopy (double *V) const 
Put vector values into userprovided array.  
int  ExtractView (double **V) const 
Set userprovided address of V.  
int  ExtractCopy (double *A, int MyLDA) const 
int  ExtractCopy (double **ArrayOfPointers) const 
int  ExtractView (double **A, int *MyLDA) const 
Set userprovided addresses of A and MyLDA.  
int  ExtractView (double ***ArrayOfPointers) const 
Set userprovided addresses of ArrayOfPointers.  
Overloaded operators  
double &  operator[] (int index) 
Element access function.  
const double &  operator[] (int index) const 
Element access function.  
Expertonly unsupported methods  
int  ResetView (double *Values) 
Reset the view of an existing vector to point to new user data.  
int  ResetView (double **ArrayOfPointers) 
Private Member Functions  
int  ChangeValues (int NumEntries, int BlockOffset, double *Values, int *Indices, bool IndicesGlobal, bool SumInto) 
The Epetra_Vector class enables the construction and use of realvalued, doubleprecision 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:
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.
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 129 of file Epetra_Vector.h.

Basic Epetra_Vector constuctor. Creates a Epetra_Vector object and fills with zero values.
Definition at line 34 of file Epetra_Vector.cpp. 

Epetra_Vector copy constructor.
Definition at line 40 of file Epetra_Vector.cpp. 

Set vector values from user array.
Definition at line 45 of file Epetra_Vector.cpp. 

Set vector values from a vector in an existing Epetra_MultiVector.
Definition at line 51 of file Epetra_Vector.cpp. 

Epetra_Vector destructor.
Definition at line 57 of file Epetra_Vector.cpp. 

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.
Definition at line 85 of file Epetra_Vector.cpp. 

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.
Definition at line 91 of file Epetra_Vector.cpp. 

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.
Definition at line 97 of file Epetra_Vector.cpp. 

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.
Definition at line 103 of file Epetra_Vector.cpp. 

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.
Definition at line 109 of file Epetra_Vector.cpp. 

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.
Definition at line 115 of file Epetra_Vector.cpp. 

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.
Definition at line 121 of file Epetra_Vector.cpp. 

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.
Definition at line 127 of file Epetra_Vector.cpp. 

Put vector values into userprovided array.
Definition at line 60 of file Epetra_Vector.cpp. 

Set userprovided address of V.
Definition at line 65 of file Epetra_Vector.cpp. 

Element access function.
Reimplemented from Epetra_MultiVector. Definition at line 385 of file Epetra_Vector.h. 

Element access function.
Reimplemented from Epetra_MultiVector. Definition at line 390 of file Epetra_Vector.h. 

Reset the view of an existing vector to point to new user data. Allows the (very) lightweight 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.
Definition at line 420 of file Epetra_Vector.h. 

Definition at line 133 of file Epetra_Vector.cpp. 





Set userprovided addresses of A and MyLDA.


Set userprovided addresses of ArrayOfPointers.


