Next: 2.1 A Simple Example
Up: User's Manual
Previous: 1.2 Assumptions and Limitations
Before writing any code:
-
Choose a conceptual interface (see Sections
2.2 and
2.3).
Generally, the choice is fairly obvious. A structured-grid interface
is clearly inappropriate for an unstructured-grid application. It is
desirable to use a more specific interface if appropriate, e.g., the
linear-algebraic interface is usable from any type of grid but will
involve much more user work and prevent access to some
grid-type-specific preconditioners.
-
Choose your desired solver strategy. For the typical user, this
will mean a single Krylov method and a single preconditioner.
-
Look up matrix requirements for each solver and preconditioner.
Each specific solver and preconditioner has requirements from the
input matrix. This information is provided in several places: Chapter
7, the HYPRE Reference Manual, and
the HYPRE header files.
-
Choose a matrix class that is compatible with your solvers and
preconditioners and your conceptual interface. Note that some of the
interfaces currently only support one matrix class choice.
Once the previous decisions have been made, it is time to code your
application to call HYPRE:
-
Build any necessary auxiliary structures for your chosen
conceptual interface. This includes, e.g., the grid and stencil
structures for the structured-grid interface.
-
Build the matrix, solution vector, and right-hand-side vector
through your chosen conceptual interface. Each conceptual interface
provides a series of calls for entering information about your problem
into HYPRE.
-
Build solvers and preconditioners and set solver parameters
(optional). Some parameters like convergence tolerance are the same
across solvers, while others are solver specific.
-
Call the solve function for the solver.
-
Retrieve desired information from solver. Depending on your
application, there may be different things you may want to do with the
solution vector. Also, performance information such as number of
iterations is typically available, though it may differ from solver to
solver.
Next: 2.1 A Simple Example
Up: User's Manual
Previous: 1.2 Assumptions and Limitations
Thomas Treadway
Fri Jul 27 10:01:25 PDT 2001