hypre/docs/usr_solvers.tex
2001-07-23 13:05:20 +00:00

97 lines
3.5 KiB
TeX

%==========================================================================
\chapter{Solvers and Preconditioners}
\label{Solvers and Preconditioners}
There are several solvers available in \hypre{} via different
conceptual interfaces (see Table \ref{table-solver-availability}).
The procedure for setup and use of solvers and preconditioners is
largely the same. We will refer to them both as solvers in the sequel
except when noted. In normal usage, the preconditioner is chosen and
constructed before the solver, and then handed to the solver as part
of the solver's setup. In the following, we assume the most common
usage pattern in which a single linear system is set up and then
solved with a single righthand side. We comment later on
considerations for other usage patterns.
\begin{table}[h]
\center
\begin{tabular}{|l||c|c|c|c|}
\hline
& \multicolumn{4}{|c|}{System Interfaces} \\
\multicolumn{1}{|c||}{Solvers} & Struct & SStruct & FEI & IJ \\
\hline\hline
Jacobi & X & & & \\
SMG & X & & & \\
PFMG & X & & & \\
BoomerAMG & & X & X & X \\
ParaSails & & X & X & X \\
Euclid & & X & X & X \\
PILUT & & X & X & X \\
PCG & X & X & X & X \\
GMRES & X & X & X & X \\
\hline
\end{tabular}
\caption{%
Current solver availability via \hypre{} conceptual interfaces.
}
\label{table-solver-availability}
\end{table}
%==========================================================================
\section*{Setup:}
\begin{enumerate}
\item
{\bf Pass to the solver the information defining the problem.} In the
typical user cycle, the user has passed this information into a matrix
through one of the conceptual interfaces prior to setting up the
solver. In this situation, the problem definition information is then
passed to the solver by passing the constructed matrix into the
solver. As described before, the matrix and solver must be compatible,
in that the matrix must provide the services needed by the
solver. Krylov solvers, for example, need only a matrix-vector
multiplication. Most preconditioners, on the other hand, have
additional requirements such as access to the matrix coefficients.
\item
{\bf Choose parameters for the preconditioner and/or solver.}
Parameters are chosen through the \code{Set()} calls provided by the
solver. As is true throughout \hypre{}, all parameters have
reasonable defaults if not chosen. Note that in \hypre{}, convergence
criteria can be chosen after the preconditioner/solver has been setup.
\item
{\bf Pass the preconditioner to the solver.} For solvers that are not
preconditioned, this step is omitted. The preconditioner is passed
through the \code{SetPreconditioner()} call.
\item
{\bf Set up the solver.} This is just the \code{Setup()} routine.
\end{enumerate}
At this point, the solver/preconditioner is fully constructed and
ready for use.
%==========================================================================
\section*{Use:}
\begin{enumerate}
\item
{\bf Set convergence criteria.} Convergence can be controlled by the
number of iterations, as well as various tolerances such as relative
residual, preconditioned residual, etc. Like all parameters,
reasonable defaults are used. Users are free to change these, though
care must be taken. For example, if an iterative method is used as a
preconditioner for a Krylov method, a constant number of iterations is
usually required.
\item
{\bf Solve the system.} This is just the \code{Solve()} routine.
\end{enumerate}