next up previous contents
Next: Error Handling Up: userhtml Previous: Subroutine descr   Contents


Adding new smoothers and solvers to MLD2P4

Developers can add completely new smoother and/or solver classes derived from the base objects in the library may be used without recompiling the library itself. To do so it is necessary first to select the base type to be extended; in our experience, it is quite likely that the new application needs only require the definition of a ``solver'' object, which is almost always acting only on the local part of the distributed matrix. The parallel actions required to connect the various solver objects are most often already provided by the Block Jacobi or the Additive Schwarz smoothers. To define a new solver, the developer will then have to define its components and methods, perhaps taking one of the predefined solvers as a starting point if possible.

Once the new smoother/solver class has been developed, to use it in the context of the multilevel preconditioners it is necessary to:

The new solver object is then dynamically included in the preconditioner structure, and will act as a mold to which the preconditioner will conform, even though the MLD2P4 library has not been modified to account for this new development.

It is possible to define new values for the keyword WHAT in the set routines; if the library code does not recognize a keyword, it passes it down the composition hierarchy (levels containing smoothers containing solvers), so that it can be eventually caught by the new solver.


smoother class(mld_x_base_smoother_type)
  The user-defined new smoother to be employed in the preconditioner.
solver class(mld_x_base_solver_type)
  The user-defined new solver to be employed in the preconditioner.


next up previous contents
Next: Error Handling Up: userhtml Previous: Subroutine descr   Contents