|
int | AllocateForCopy () |
|
int | DoCopy (int *V) |
|
int | AllocateForView () |
|
int | DoView (int *V) |
|
int | CheckSizes (const Epetra_SrcDistObject &A) |
| Allows the source and target (this) objects to be compared for compatibility, return nonzero if not. More...
|
|
int | CopyAndPermute (const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero) |
| Perform ID copies and permutations that are on processor. More...
|
|
int | PackAndPrepare (const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor) |
| Perform any packing or preparation required for call to DoTransfer(). More...
|
|
int | UnpackAndCombine (const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor) |
| Perform any unpacking and combining after call to DoTransfer(). More...
|
|
|
| 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...
|
|
| 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...
|
|
virtual | ~Epetra_SrcDistObject () |
| Epetra_SrcDistObject destructor. More...
|
|
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 int | TracebackMode |
|
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...
|
|
std::string | toString (const int &x) const |
|
std::string | toString (const long long &x) const |
|
std::string | toString (const double &x) const |
|
Epetra_BlockMap | Map_ |
|
const Epetra_Comm * | Comm_ |
|
char * | Exports_ |
|
char * | Imports_ |
|
int | LenExports_ |
|
int | LenImports_ |
|
int * | Sizes_ |
|
Epetra_IntVector: A class for constructing and using dense integer vectors on a parallel computer.
The Epetra_IntVector class enables the construction and use of integer
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).
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_IntVectors
There are four Epetra_IntVector 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_IntVector 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_IntVector constructors:
-
Basic - All values are zero.
-
Copy - Copy an existing vector.
-
Copy from or make view of user int array.
Extracting Data from Epetra_IntVectors
Once a Epetra_IntVector 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_IntVector data.
- Warning
- A Epetra_Map, Epetra_LocalMap or Epetra_BlockMap object is required for all Epetra_IntVector constructors.
Definition at line 124 of file Epetra_IntVector.h.