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:

1. The set of indices owned locally must be mapped to the set ;
2. 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 caught by the library, but this is not guaranteed. The application structure to support this usage is as follows:

1. 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;
2. 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)`;
3. Assemble the descriptor with `psb_cdasb`;
4. 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.