#include <Epetra_BlockMap.h>
Inheritance diagram for Epetra_BlockMap:
Public Member Functions | |
Constructors/destructors. | |
| Epetra_BlockMap (int NumGlobalElements, int ElementSize, int IndexBase, const Epetra_Comm &Comm) | |
| Epetra_BlockMap constructor for a Epetra-defined uniform linear distribution of constant size elements. | |
| Epetra_BlockMap (int NumGlobalElements, int NumMyElements, int ElementSize, int IndexBase, const Epetra_Comm &Comm) | |
| Epetra_BlockMap constructor for a user-defined linear distribution of constant size elements. | |
| Epetra_BlockMap (int NumGlobalElements, int NumMyElements, int *MyGlobalElements, int ElementSize, int IndexBase, const Epetra_Comm &Comm) | |
| Epetra_BlockMap constructor for a user-defined arbitrary distribution of constant size elements. | |
| Epetra_BlockMap (int NumGlobalElements, int NumMyElements, int *MyGlobalElements, int *ElementSizeList, int IndexBase, const Epetra_Comm &Comm) | |
| Epetra_BlockMap constructor for a user-defined arbitrary distribution of variable size elements. | |
| Epetra_BlockMap (const Epetra_BlockMap &map) | |
| Epetra_BlockMap copy constructor. | |
| virtual | ~Epetra_BlockMap (void) |
| Epetra_BlockMap destructor. | |
Local/Global ID accessor methods. | |
| int | RemoteIDList (int NumIDs, const int *GIDList, int *PIDList, int *LIDList) const |
| Returns the processor IDs and corresponding local index value for a given list of global indices. | |
| int | RemoteIDList (int NumIDs, const int *GIDList, int *PIDList, int *LIDList, int *SizeList) const |
| Returns the processor IDs, corresponding local index value, and element size for a given list of global indices. | |
| int | LID (int GID) const |
| Returns local ID of global ID, return -1 if not found on this processor. | |
| int | GID (int LID) const |
| Returns global ID of local ID, return IndexBase-1 if not found on this processor. | |
| int | FindLocalElementID (int PointID, int &ElementID, int &ElementOffset) const |
| Returns the LID of the element that contains the given local PointID, and the Offset of the point in that element. | |
| bool | MyGID (int GID) const |
| Returns true if the GID passed in belongs to the calling processor in this map, otherwise returns false. | |
| bool | MyLID (int LID) const |
| Returns true if the LID passed in belongs to the calling processor in this map, otherwise returns false. | |
| int | MinAllGID () const |
| Returns the minimum global ID across the entire map. | |
| int | MaxAllGID () const |
| Returns the maximum global ID across the entire map. | |
| int | MinMyGID () const |
| Returns the maximum global ID owned by this processor. | |
| int | MaxMyGID () const |
| Returns the maximum global ID owned by this processor. | |
| int | MinLID () const |
| The minimum local index value on the calling processor. | |
| int | MaxLID () const |
| The maximum local index value on the calling processor. | |
Size and dimension accessor functions | |
| int | NumGlobalElements () const |
| Number of elements across all processors. | |
| int | NumMyElements () const |
| Number of elements on the calling processor. | |
| int | MyGlobalElements (int *MyGlobalElementList) const |
| Puts list of global elements on this processor into the user-provided array. | |
| int | ElementSize () const |
| Returns the size of elements in the map; only valid if map has constant element size. | |
| int | ElementSize (int LID) const |
| Size of element for specified LID. | |
| int | FirstPointInElement (int LID) const |
| Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details. | |
| int | IndexBase () const |
| Index base for this map. | |
| int | NumGlobalPoints () const |
| Number of global points for this map; equals the sum of all element sizes across all processors. | |
| int | NumMyPoints () const |
| Number of local points for this map; equals the sum of all element sizes on the calling processor. | |
| int | MinMyElementSize () const |
| Minimum element size on the calling processor. | |
| int | MaxMyElementSize () const |
| Maximum element size on the calling processor. | |
| int | MinElementSize () const |
| Minimum element size across all processors. | |
| int | MaxElementSize () const |
| Maximum element size across all processors. | |
Miscellaneous boolean tests | |
| bool | ConstantElementSize () const |
| Returns true if map has constant element size. | |
| bool | SameAs (const Epetra_BlockMap &Map) const |
| Returns true if this and Map are identical maps. | |
| bool | PointSameAs (const Epetra_BlockMap &Map) const |
| Returns true if this and Map have identical point-wise structure. | |
| bool | LinearMap () const |
| Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across all processors. | |
| bool | DistributedGlobal () const |
| Returns true if map is defined across more than one processor. | |
Array accessor functions | |
| int * | MyGlobalElements () const |
| Pointer to internal array containing list of global IDs assigned to the calling processor. | |
| int * | FirstPointInElementList () const |
| Pointer to internal array containing a mapping between the local elements and the first local point number in each element. | |
| int * | ElementSizeList () const |
| List of the element sizes corresponding to the array MyGlobalElements(). | |
| int * | PointToElementList () const |
| For each local point, indicates the local element ID that the point belongs to. | |
| int | ElementSizeList (int *ElementSizeList) const |
| Same as ElementSizeList() except it fills the user array that is passed in. | |
| int | FirstPointInElementList (int *FirstPointInElementList) const |
| Same as FirstPointInElementList() except it fills the user array that is passed in. | |
| int | PointToElementList (int *PointToElementList) const |
| Same as PointToElementList() except it fills the user array that is passed in. | |
Miscellaneous | |
| virtual void | Print (ostream &os) const |
| Print object to an output stream. | |
| const Epetra_Comm & | Comm () const |
| Access function for Epetra_Comm communicator. | |
| Epetra_BlockMap & | operator= (const Epetra_BlockMap &map) |
| Assignment Operator. | |
Expert Users and Developers Only | |
| int | ReferenceCount () const |
| Returns the reference count of BlockMapData. | |
| const Epetra_BlockMapData * | DataPtr () const |
| Returns a pointer to the BlockMapData instance this BlockMap uses. | |
Friends | |
| class | Epetra_Directory |
| class | Epetra_LocalMap |
It is often the case that multiple matrix and vector objects have an identical distribution of elements on a parallel machine. The Epetra_BlockMap class keeps information that describes this distribution for matrices and vectors that have block elements. The definition of an element can vary depending on the situation. For vectors (and multi-vectors), an element is a span of one or more contiguous entries. For matrices, it is a span of one or more matrix rows. More generally, an element in the BlockMap class is an ordered list of points. (NOTE: Points do not have global ID's.) Two additional definitions useful in understanding the BlockMap class follow:
This class has a variety of constructors that can be separated into two categories:
Epetra_BlockMap allows the storage and retrieval of the following information. Depending on the constructor that is used, some of the information is defined by the user and some is determined by the constructor. Once an Epetra_BlockMap is constructed any of the following can be obtained by calling a query function that has the same name as the attribute, e.g. to get the value of NumGlobalElements, you can call a function NumGlobalElements(). For attributes that are lists, the query functions return the list values in a user allocated array.
In addition to the information above that is passed in to or created by the Epetra_BlockMap constructor, the following attributes are computed and available via query to the user using the same scheme as above, e.g., use NumGlobalPoints() to get the value of NumGlobalPoints.
The following functions allow boolean tests for certain properties.
Most methods in Epetra_BlockMap return an integer error code. If the error code is 0, then no error occurred. If > 0 then a warning error occurred. If < 0 then a fatal error occurred.
Epetra_BlockMap constructors will throw an exception of an error occurrs. These exceptions will alway be negative integer values as follows:
For robust code, Epetra_BlockMap constructor calls should be caught using the try {...} catch {...} mechanism. For example:
try {
Epetra_BlockMap * map = new Epetra_BlockMap(NumGlobalElements, ElementSize, IndexBase, Comm);
}
catch (int Error) {
if (Error==-1) { // handle error }
if (Error==-2) ...
|
||||||||||||||||||||
|
Epetra_BlockMap constructor for a Epetra-defined uniform linear distribution of constant size elements. Creates a map that distributes NumGlobalElements elements evenly across all processors in the Epetra_Comm communicator. If NumGlobalElements does not divide exactly into the number of processors, the first processors in the communicator get one extra element until the remainder is gone. The elements are defined to have a constant fixed size specified by ElementSize.
|
|
||||||||||||||||||||||||
|
Epetra_BlockMap constructor for a user-defined linear distribution of constant size elements. Creates a map that puts NumMyElements on the calling processor. NumGlobalElements will be the computed sum of NumMyElements across all processors in the Epetra_Comm communicator. The elements are defined to have a constant fixed size specified by ElementSize.
|
|
||||||||||||||||||||||||||||
|
Epetra_BlockMap constructor for a user-defined arbitrary distribution of constant size elements. Creates a map that puts NumMyElements on the calling processor. The indices of the elements are determined from the list MyGlobalElements. NumGlobalElements will be the computed sum of NumMyElements across all processors in the Epetra_Comm communicator. The elements are defined to have a constant fixed size specified by ElementSize.
|
|
||||||||||||||||||||||||||||
|
Epetra_BlockMap constructor for a user-defined arbitrary distribution of variable size elements. Creates a map that puts NumMyElements on the calling processor. NumGlobalElements will be the computed sum of NumMyElements across all processors in the Epetra_Comm communicator. The elements are defined to have a variable size defined by ElementSizeList.
|
|
|
Returns a pointer to the BlockMapData instance this BlockMap uses. (Intended for developer use only for testing purposes.) |
|
|
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details. This function provides similar functionality to FirstPointInElementList(), but for simple maps may avoid the explicit construction of the FirstPointInElementList array. Returns -1 if LID is out-of-range. |
|
|
Pointer to internal array containing a mapping between the local elements and the first local point number in each element. This array is a scan sum of the ElementSizeList such that the ith entry in FirstPointInElementList is the sum of the first i-1 entries of ElementSizeList(). |
|
|
Returns true if this and Map have identical point-wise structure. If both maps have the same number of global points and the same point distribution across processors then this method returns true. |
|
|
Returns the reference count of BlockMapData. (Intended for testing purposes.) |
|
||||||||||||||||||||||||
|
Returns the processor IDs, corresponding local index value, and element size for a given list of global indices. For each element (GID) of a given a list of global element numbers (stored in GIDList) of length NumIDs, this function returns (in PIDList) the with processor that owns the GID for this map and returns the local index (in LIDList) of the GID on that processor. Finally it returns the element sizes in SizeList. |
|
||||||||||||||||||||
|
Returns the processor IDs and corresponding local index value for a given list of global indices. For each element (GID) of a given list of global element numbers (stored in GIDList) of length NumIDs, this function returns (in PIDList) the with processor that owns the GID for this map and returns the local index (in LIDList) of the GID on that processor. |
1.3.9.1