6.9 psb_spasb — Sparse matrix assembly routine
call psb_spasb(a, desc_a, info [, afmt, upd, 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_
-
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.
-
desc_a
- the communication descriptor.
Scope:local.
Type:required.
Intent: in/out.
Specified as: a structured data of type psb_desc_type. If the matrix was
allocated with bldmode=psb_matbld_remote_, then the descriptor will be
reassembled.
-
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 bldmode=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_; it is necessary to
check for possible updates needed in the descriptor, hence there will be a
runtime overhead.