next up previous contents index
Next: 2.1 A Simple Example Up: User's Manual Previous: 1.2 Assumptions and Limitations

2 Getting Started

 

Before writing any code:

  1. 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.
  2. Choose your desired solver strategy. For the typical user, this will mean a single Krylov method and a single preconditioner.
  3. 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.
  4. 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:
  1. Build any necessary auxiliary structures for your chosen conceptual interface. This includes, e.g., the grid and stencil structures for the structured-grid interface.
  2. 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.
  3. Build solvers and preconditioners and set solver parameters (optional). Some parameters like convergence tolerance are the same across solvers, while others are solver specific.
  4. Call the solve function for the solver.
  5. 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 up previous contents index
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