Next: Programming model
Up: Application structure
Previous: Application structure
Contents
User-defined index mappings
PSBLAS supports user-defined global to local index mappings, subject
to the constraints outlined in sec. 2.3:
- The set of indices owned locally must be mapped to the set
;
- The set of halo points must be mapped to the set
;
but otherwise the mapping is arbitrary. The user application is
responsible to ensure consistency of this mapping; some errors may be
catched by the library, but this is not guaranteed.
The application structure to
support this usage is as follows:
- Initialize index space with
psb_cdall(ictx,desc,info,vl=vl,lidx=lidx)
passing the vectors
vl(:)
containing the set of global indices owned by the
current process and lidx(:)
containing the corresponding
local indices;
- Add the halo points
ja(:)
and their associated local
indices lidx(:)
with a(some) call(s) to
psb_cdins(nz,ja,desc,info,lidx=lidx)
;
- Assemble the descriptor with
psb_cdasb
;
- Build the sparse matrices and vectors, optionally making use in
psb_spins
and psb_geins
of the local
argument
specifying that the indices in ia
, ja
and irw
,
respectively, are already local indices.