Next: psb_spfree Frees Up: Data management routines Previous: psb_spins Insert Contents

## psb_spasb -- Sparse matrix assembly routine

    call psb_spasb(a, desc_a, info, afmt, upd, dupl)

Type:
  Synchronous.
On Entry
desc_a
  the communication descriptor.
  Scope:local.
  Type:required.
  Intent: in.
  Specified as: a structured data of type descdata`psb_desc_type`.
afmt
  the storage format for the sparse matrix.
  Scope: global.
  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_`.

On Return
a
  the matrix to be assembled.
  Scope:local
  Type:required
  Intent: inout.
  Specified as: a structured data of type spdata`psb_spmat_type`.
info
  Error code.
  Scope: local
  Type: required
  Intent: out.
  An integer value; 0 means no error has been detected.

Notes

1. On entry to this routine the descriptor must be in the assembled state, i.e. `psb_cdasb` must already have been called.
2. The sparse matrix may be in either the build or update state;
3. 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;
4. 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;
5. On exit from this routine the matrix is in the assembled state, and thus is suitable for the computational routines.

Next: psb_spfree Frees Up: Data management routines Previous: psb_spins Insert Contents