6.9 psb_spasb — Sparse matrix assembly routine
call psb_spasb(a, desc_a, info, afmt, upd, dupl, mold)
-
Type:
- Synchronous.
-
On Entry
-
-
desc_a
- the communication descriptor.
Scope:local.
Type:required.
Intent: in/out.
Specified as: a structured data of type psb_desc_type.
-
afmt
- the storage format for the sparse matrix.
Scope: local.
Type: optional.
Intent: in.
Specified as: an array of characters. Defalt: ’CSR’.
-
upd
- Provide for updates to the matrix coefficients.
Scope: global.
Type: optional.
Intent: in.
Specified as: integer, possible values: psb_upd_srch_, psb_upd_perm_
-
dupl
- How to handle duplicate coefficients.
Scope: global.
Type: optional.
Intent: in.
Specified as: integer, possible values: psb_dupl_ovwrt_, psb_dupl_add_,
psb_dupl_err_.
-
mold
- The desired dynamic type for the internal matrix storage.
Scope: local.
Type: optional.
Intent: in.
Specified as: an object of a class derived from psb_T_base_sparse_mat.
-
On Return
-
-
a
- the matrix to be assembled.
Scope:local
Type:required
Intent: inout.
Specified as: a structured data of type psb_Tspmat_type.
-
info
- Error code.
Scope: local
Type: required
Intent: out.
An integer value; 0 means no error has been detected.
Notes
- On entry to this routine the descriptor must be in the assembled state,
i.e. psb_cdasb must already have been called.
- The sparse matrix may be in either the build or update state;
- Duplicate entries are detected and handled in both build and update state,
with the exception of the error action that is only taken in the build state,
i.e. on the first assembly;
- If the update choice is psb_upd_perm_, then subsequent calls to psb_spins
to update the matrix must be arranged in such a way as to produce exactly
the same sequence of coefficient values as encountered at the first assembly;
- The output storage format need not be the same on all processes;
- On exit from this routine the matrix is in the assembled state, and thus
is suitable for the computational routines;
- If the buildmode=psb_matbld_remote_ value was specified at allocation
time, contributions defined on the current process but belonging to a
remote process will be handled accordingly. This is most likely to occur
in finite element applications, with dupl=psb_dupl_add_; note that the
descriptor will be updated, and there will be a runtime overhead.