next up previous contents
Next: Methods Up: Data Structures and Classes Previous: Data Structures and Classes   Contents


Descriptor data structure

All the general matrix informations and elements to be exchanged among processes are stored within a data structure of the type descdatapsb_desc_type. Every structure of this type is associated with a discretization pattern and enables data communications and other operations that are necessary for implementing the various algorithms of interest to us.

The data structure itself psb_desc_type can be treated as an opaque object handled via the tools routines of Sec. 6 and 3.5; nevertheless we include here a description for the curious reader.

First we describe the psb_indx_map type. This is a data structure that keeps track of a certain number of basic issues such as:

There are many different schemes for storing these data; therefore there are a number of types extending the base one, and the descriptor structure holds a polymorphic object whose dynamic type can be any of the extended types. The methods associated with this data type answer the following queries: All methods but the last are purely local; the last method potentially requires communication among processes, and thus is a synchronous method. The choice of a specific dynamic type for the index map is made at the time the descriptor is initially allocated, according to the mode of initialization (see also 6).

The descriptor contents are as follows:

indxmap
A polymorphic variable of a type that is any extension of the indx_map type described above.
halo_index
A list of the halo and boundary elements for the current process to be exchanged with other processes; for each processes with which it is necessary to communicate:
  1. Process identifier;
  2. Number of points to be received;
  3. Indices of points to be received;
  4. Number of points to be sent;
  5. Indices of points to be sent;
The list may contain an arbitrary number of groups; its end is marked by a -1.
Specified as: an allocatable integer array of rank one.
ext_index
A list of element indices to be exchanged to implement the mapping between a base descriptor and a descriptor with overlap.
ovrlap_index
A list of the overlap elements for the current process, organized in groups like the previous vector:
  1. Process identifier;
  2. Number of points to be received;
  3. Indices of points to be received;
  4. Number of points to be sent;
  5. Indices of points to be sent;
The list may contain an arbitrary number of groups; its end is marked by a -1.
Specified as: an allocatable integer array of rank one.
ovr_mst_idx
A list to retrieve the value of each overlap element from the respective master process.
Specified as: an allocatable integer array of rank one.
ovrlap_elem
For all overlap points belonging to th ecurrent process:
  1. Overlap point index;
  2. Number of processes sharing that overlap points;
  3. Index of a ``master'' process:
Specified as: an allocatable integer array of rank two.
bnd_elem
A list of all boundary points, i.e. points that have a connection with other processes.
The Fortran 2003 declaration for psb_desc_type structures is as follows:
Figure 3: The PSBLAS defined data type that contains the communication descriptor.

\fbox{\TheSbox}

A communication descriptor associated with a sparse matrix has a state, which can take the following values:

Build:
State entered after the first allocation, and before the first assembly; in this state it is possible to add communication requirements among different processes.
Assembled:
State entered after the assembly; computations using the associated sparse matrix, such as matrix-vector products, are only possible in this state.



Subsections
next up previous contents
Next: Methods Up: Data Structures and Classes Previous: Data Structures and Classes   Contents