

Public Member Functions | |
| def | __init__ |
| def | ReplaceGlobalValues |
| def | ReplaceMyValues |
| def | SumIntoGlobalValues |
| def | SumIntoMyValues |
Public Attributes | |
| this | |
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 Distributed Global Vectors - In most instances, a multi-vector will be partitioned across multiple memory images associated with multiple processors. In this case, there is a unique copy of each element and elements are spread across all processors specified by the Epetra_Comm communicator. Replicated Local Vectors - Some algorithms use vectors that are too small to be distributed across all processors. Replicated local vectors handle these types of situation. 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: Copy mode - Allocates memory and makes a copy of the user-provided data. In this case, the user data is not needed after construction. View mode - Creates a "view" of the user data. In this case, the user data is required to remain intact for the life of the vector. WARNING: View mode is extremely dangerous from a data hiding perspective. Therefore, we strongly encourage users to develop code using Copy mode first and only use the View mode in a secondary optimization phase. 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: Basic - All values are zero. Copy - Copy an existing vector. Copy from or make view of user double array. Copy or make view of a vector from a Epetra_MultiVector object. 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. WARNING: ExtractView functions are extremely dangerous from a data hiding perspective. For both ExtractView fuctions, there is a corresponding ExtractCopy function. We strongly encourage users to develop code using ExtractCopy functions first and only use the ExtractView functions in a secondary optimization phase. There are two Extract functions: ExtractCopy - Copy values into a user-provided array. ExtractView - Set user-provided array to point to Epetra_Vector data. Vector and Utility Functions Once a Epetra_Vector is constructed, a variety of mathematical functions can be applied to the vector. Specifically: Dot Products. Vector Updates. p Norms. Weighted Norms. Minimum, Maximum and Average Values. 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. WARNING: A Epetra_Map, Epetra_LocalMap or Epetra_BlockMap object is required for all Epetra_Vector constructors. C++ includes: Epetra_Vector.h
| def PyTrilinos.Epetra.Epetra_Vector.__init__ | ( | self, | |
| args | |||
| ) |
__init__(Epetra_Vector self, BlockMap Map, bool zeroOut=True) -> Epetra_Vector __init__(Epetra_Vector self, Epetra_Vector Source) -> Epetra_Vector __init__(Epetra_Vector self, Epetra_DataAccess CV, BlockMap Map, double * V) -> Epetra_Vector __init__(Epetra_Vector self, Epetra_DataAccess CV, Epetra_MultiVector Source, int Index) -> Epetra_Vector Epetra_Vector::Epetra_Vector(Epetra_DataAccess CV, const Epetra_MultiVector &Source, int Index) Set vector values from a vector in an existing Epetra_MultiVector. Parameters: ----------- 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. Integer error code, set to 0 if successful. See Detailed Description section for further discussion.
Reimplemented from PyTrilinos.Epetra.Epetra_MultiVector.
Reimplemented in PyTrilinos.Epetra.Vector, PyTrilinos.Epetra.NumPyVector, and PyTrilinos.Epetra.Vector.
| def PyTrilinos.Epetra.Epetra_Vector.ReplaceGlobalValues | ( | self, | |
| args | |||
| ) |
ReplaceGlobalValues(Epetra_Vector self, int NumEntries, double const * Values, int const * Indices) -> int ReplaceGlobalValues(Epetra_Vector self, int NumEntries, double const * Values, long long const * Indices) -> int ReplaceGlobalValues(Epetra_Vector self, int NumEntries, int BlockOffset, double const * Values, int const * Indices) -> int 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. Parameters: ----------- 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. Integer error code, set to 0 if successful, set to 1 if one or more indices are not associated with calling processor.
Reimplemented in PyTrilinos.Epetra.NumPyVector.
| def PyTrilinos.Epetra.Epetra_Vector.ReplaceMyValues | ( | self, | |
| args | |||
| ) |
ReplaceMyValues(Epetra_Vector self, int NumEntries, double const * Values, int const * Indices) -> int ReplaceMyValues(Epetra_Vector self, int NumEntries, int BlockOffset, double const * Values, int const * Indices) -> int 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. Parameters: ----------- 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. Integer error code, set to 0 if successful, set to 1 if one or more indices are not associated with calling processor.
Reimplemented in PyTrilinos.Epetra.NumPyVector.
| def PyTrilinos.Epetra.Epetra_Vector.SumIntoGlobalValues | ( | self, | |
| args | |||
| ) |
SumIntoGlobalValues(Epetra_Vector self, int NumEntries, double const * Values, int const * Indices) -> int SumIntoGlobalValues(Epetra_Vector self, int NumEntries, int BlockOffset, double const * Values, int const * Indices) -> int 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. Parameters: ----------- 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. Integer error code, set to 0 if successful, set to 1 if one or more indices are not associated with calling processor.
Reimplemented in PyTrilinos.Epetra.NumPyVector.
| def PyTrilinos.Epetra.Epetra_Vector.SumIntoMyValues | ( | self, | |
| args | |||
| ) |
SumIntoMyValues(Epetra_Vector self, int NumEntries, double const * Values, int const * Indices) -> int SumIntoMyValues(Epetra_Vector self, int NumEntries, int BlockOffset, double const * Values, int const * Indices) -> int 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. Parameters: ----------- 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. Integer error code, set to 0 if successful, set to 1 if one or more indices are not associated with calling processor.
Reimplemented in PyTrilinos.Epetra.NumPyVector.
1.7.6.1