# User Interface
Keywords: userhtml

Next: Subroutine mld_precinit Up: userhtml Previous: Examples Contents

#
User Interface

The basic user interface of MLD2P4 consists of six routines. The four routines `mld_` `precinit`, `mld_precset`, `mld_precbld` and `mld_precaply` encapsulate all the functionalities for the setup and the application of any one-level and multi-level preconditioner implemented in the package. The routine `mld_precfree` deallocates the preconditioner data structure, while `mld_precdescr` prints a description of the preconditioner setup by the user.

For each routine, the same user interface is overloaded with respect to the real/complex case and the single/double precision; arguments with appropriate data types must be passed to the routine, i.e.

- the sparse matrix data structure, containing the matrix to be preconditioned, must be of type `mld_`x `spmat_type` with x = `s` for real single precision, x = `d` for real double precision, x = `c` for complex single precision, x = `z` for complex double precision;
- the preconditioner data structure must be of type `mld_`x `prec_type`, with x = `s`, `d`, `c`, `z`, according to the sparse matrix data structure;
- the arrays containing the vectors and involved in the preconditioner application must be of type type`(`kind_parameter`)`, with type = `real`, `complex` and kind_parameter = `kind(1.e0)`, `kind(1.d0)`, according to the sparse matrix and preconditioner data structure; note that the PSBLAS module `psb_base_mod` provides the constants `psb_spk_` = `kind(1.e0)` and `psb_dpk_` = `kind(1.d0)`;
- real parameters defining the preconditioner must be declared according to the precision of the sparse matrix and preconditioner data structures (see Section 6.2).

A description of each routine is given in the remainder of this section.

Subsections

- Subroutine mld_precinit
- Subroutine mld_precset
- Subroutine mld_precbld
- Subroutine mld_precaply
- Subroutine mld_precfree
- Subroutine mld_precdescr

Next: Subroutine mld_precinit Up: userhtml Previous: Examples Contents