Data Structures and Classes
In this chapter we illustrate the data structures used for definition of
routines interfaces. They include data structures for sparse matrices,
communication descriptors and preconditioners.
All the data types and the basic subroutine interfaces related to
descriptors and sparse matrices are defined in
the module psb_base_mod
; this will have to be included by every
user subroutine that makes use of the library. The preconditioners are
defined in the module psb_prec_mod
Integer, real and complex data types are parametrized with a kind type
defined in the library as follows:
- psb_spk_
- Kind parameter for short precision real and complex
data; corresponds to a
REAL
declaration and is
normally 4 bytes;
- psb_dpk_
- Kind parameter for long precision real and complex
data; corresponds to a
DOUBLE PRECISION
declaration and is
normally 8 bytes;
- psb_mpk_
- Kind parameter for 4-bytes integer data, as is
always used by MPI;
- psb_epk_
- Kind parameter for 8-bytes integer data, as is
always used by the
sizeof
methods;
- psb_ipk_
- Kind parameter for “local” integer indices and data;
with default build options this is a 4 bytes integer;
- psb_lpk_
- Kind parameter for “global” integer indices and data;
with default build options this is an 8 bytes integer;
The integer kinds for local and global indices can be chosen at
configure time to hold 4 or 8 bytes, with the global indices at least
as large as the local ones.
Together with the classes attributes we also discuss their
methods. Most methods detailed here only act on the local variable,
i.e. their action is purely local and asynchronous unless otherwise
stated.
The list of methods here is not completely exhaustive; many methods,
especially those that alter the contents of the various objects, are
usually not needed by the end-user, and therefore are described in the
developer's documentation.
Subsections