next up previous contents index
Next: 7.4 ParaSails Up: 7. Solvers and Preconditioners Previous: 7.2 PFMG   Contents   Index

Subsections

7.3 BoomerAMG

BoomerAMG is a parallel implementation of algebraic multigrid. It can be used both as a solver or as a preconditioner. The user can choose between various different parallel coarsening techniques and relaxation schemes. See [6] for a detailed description of the coarsening algorithms, the interpolation and nueemerical results. The following coarsening techniques are available:

The following relaxation techniques are available:

7.3.1 Synopsis

The solver is set up and run using the following routines, where A is the matrix, b the right hand side and x the solution vector of the linear system to be solved:

#include "HYPRE_parcsr_ls.h"

int HYPRE_BoomerAMGCreate(HYPRE_Solver *solver); 

<set certain parameters if desired >

int HYPRE_BoomerAMGSetup(HYPRE_Solver solver, HYPRE_ParCSRMatrix A,
  HYPRE_ParVector b, HYPRE_ParVector x);
int HYPRE_BoomerAMGSolve(HYPRE_Solver solver, HYPRE_ParCSRMatrix A,
  HYPRE_ParVector b, HYPRE_ParVector x);
int HYPRE_BoomerAMGDestroy(HYPRE_Solver solver);

7.3.2 Interface functions

Parameters for setting up the code are specified using the following routines:

HYPRE_BoomerAMGSetMaxLevels

int HYPRE_BoomerAMGSetMaxLevels( HYPRE_Solver solver, int max_levels);
max_levels defines the maximal number of multigrid levels allowed. The default is 25.

HYPRE_BoomerAMGSetMaxIter

int HYPRE_BoomerAMGSetMaxIter( HYPRE_Solver solver, int max_iter);
max_iter defines the maximal number of iterations allowed. The default is 20.

HYPRE_BoomerAMGSetTol

int HYPRE_BoomerAMGSetTol( HYPRE_Solver solver, double tol);
tol defines the tolerance needed for the stopping criterion $\Vert b ~ - ~ Ax^{(n)} \Vert _2 / \Vert b \Vert _2 \leq $ tol. The default for tol is $10 ^{-7}$.

HYPRE_BoomerAMGSetStrongThreshold

int HYPRE_BoomerAMGSetStrongThreshold( HYPRE_Solver solver,
	double strong_threshold);
A point $i$ is strongly connected to $j$, if $-a_{i,j} \geq \theta
\max_{j \neq i} \-a_{ij}$, where the strong threshold $\theta$ is a value between 0 and 1. Weak connections are usually ignored when determining the next lower level. Consequently, choosing a larger strong threshold leads in general to smaller coarse grids, but worse convergence rates. The default value for $\theta$ is 0.25, which appears to be a good choice for 2-dimensional problems. A better choice for 3-dimensional problems appears to be 0.5. However, the choice of the strength threshold is problem dependent and therefore there could be better choices than the two suggested ones.

HYPRE_BoomerAMGSetMaxRowSum

int HYPRE_BoomerAMGSetMaxRowSum( HYPRE_Solver solver, double max_row_sum);
This feature leads to a more efficient treatment of very diagonally dominant portions of the matrix. If the absolute row sum of row i weighted by the diagonal is greater than max_row_sum all dependencies of variable i are set to be weak. This feature can be switched off by setting max_row_sum to 1.0. The default is 0.9.

HYPRE_BoomerAMGSetCoarsenType

int HYPRE_BoomerAMGSetCoarsenType( HYPRE_Solver solver, int coarsen_type  );
coarsen_type defines the coarsening used. The following options are possible:

0 CLJP-coarsening
1 Ruge-Stueben coarsening without boundary treatment
3 Ruge-Stueben coarsening with a 3rd 'second' pass on the boundaries
6 Falgout coarsening (default)

HYPRE_BoomerAMGSetMeasureType

int HYPRE_BoomerAMGSetMeasureType( HYPRE_Solver solver, int measure_type  );
measure_type defines whether local (measure_type = 0, default) or global measures (measure_type = 1) are used within the coarsening algorithm. This feature is ignored for the CLJP and the Falgout coarsening.

HYPRE_BoomerAMGSetNumGridSweeps

int HYPRE_BoomerAMGSetNumGridSweeps( HYPRE_Solver solver, int* num_grid_sweeps );
num_grid_sweeps[k] defines the number of sweeps over the grid on the fine grid (k=0), the down cycle (k=1), the up cycle (k=2) and the coarse grid (k=3).

HYPRE_BoomerAMGSetGridRelaxType

int HYPRE_BoomerAMGSetGridRelaxType( HYPRE_Solver solver, int* grid_relax_type );
grid_relax_type[k] defines the relaxation used on the fine grid (k=0), the down cycle (k=1), the up cycle (k=2) and the coarse grid (k=3). The following options are possible for grid_relax_type[k]:

0 weighted Jacobi
1 sequential Gauss-Seidel (very slow!)
3 Gauss-Seidel / Jacobi hybrid method (default)
6 symmetric Gauss-Seidel / Jacobi hybrid method
9 Gaussian elimination (only for the coarsest level (k=3), not recommended
  if the system on the coarsest level is large)

HYPRE_BoomerAMGSetGridRelaxPoints

int HYPRE_BoomerAMGSetGridRelaxPoints( HYPRE_Solver solver, 
	int** grid_relax_points);
grid_relax_points[i][j] defines which points are to be relaxed during the (j+1)-th sweep on the fine grid (i=0), the down cycle (i=1), the up cycle (i=2) and the coarse grid (i=3), e.g. if grid_relax_points[1][0] is -1, all points marked -1 (which are in general fine points) are relaxed on the first sweep of the down cycle. Note: grid_relax_points[3][j] needs to be 0 always, since the concept of coarse and fine points does not exist on the coarsest grid. If the user sets it to another value, it will be automatically set to 0 and a warning printed, unless the direct solver is used.

HYPRE_BoomerAMGSetRelaxWeight

int HYPRE_BoomerAMGSetRelaxWeight( HYPRE_Solver solver, double* relax_weight);
defines the relaxation weights used on each level, if weighted Jacobi is used as relaxation method. The default relaxation weight is 1.0 on each level.

HYPRE_BoomerAMGSetPrintLevel

int HYPRE_BoomerAMGSetPrintLevel( HYPRE_Solver solver, int print_level);
where ioutdat determines whether statistics information is generated and printed. The information is printed to standard output. The following options are possible:

0 no output (default)
1 matrix statistics (includes information on interpolation operators and
  matrices generated on each level)
2 cycle statistics (includes residuals generated during solve phase)
3 matrix and cycle statistics


next up previous contents index
Next: 7.4 ParaSails Up: 7. Solvers and Preconditioners Previous: 7.2 PFMG   Contents   Index
Tom Treadway 2003-10-22