A Software Package for Generating Test Matrices for the Convection-Diffusion Equations

Version 1.0, July 1997

Jun Zhang

Department of Computer Science
University of Kentucky
Lexington, KY 40506--0046, USA

Convection-Diffusion Test Problems

Test problems (matrices) for multigrid method and other iterative methods.
The convection-diffusion equation is of the form

-[Uxx + Uyy + Re( p(x,y)Ux + q(x,y)Uy )] = f(x,y),

where Re is the so-called Reynolds number. This equation offers some simple but non-trivial test problems for iterative linear system solvers. In the context of multigrid methods, some geometric, algebraic multigrid methods, and multigrid methods with the so-called matrix-dependent grid-transfer operators have been designed and tested for solving the convection-diffusion problems. However, most of these multigrid methods were designed with the assumption that the coefficient matrix is an $M$-matrix or with similarly very nice property, although in reality, as I am aware of, many of these methods can solve problems that do not satisfy this assumption.

As a result of lacking more demanding test problems, most of these methods have been tested with the upwind finite difference discretization (or similar discretization schemes with added diffusion terms) and the resulting coefficient matrix is usually strongly diagonally dominant. In fact, there is no much difference in the published results in terms of the tested convergence and the number of iterations.

In order to facilitate testing iterative methods, followed by several requests, I provide here, for convenience, some codes to generate several test problems (linear systems) using different different discretization schemes:

For large Re, the above order represents decreasing order of difficulty for iterative methods. The coefficient matrices can be generated using Re and uniform meshsize $h$, assuming the problems are defined on the unit square (0,1)x(0,1). Dirichlet boundary conditions are assumed and the exact solutions are given.
I have Fortran that can generate matrices with Compressed Sparse Row Format, standard codes are also available to store and read the matrices in standard Harwell-Boeing sparse matrix format. I just put the Fortran source codes on-line and you can down load these subroutines and generate the matrices when they are needed. If you want to generate matrices using other format or do not want any specific format, a Fortran code that can be used to compute the stencils are given. These codes do not mean to be very efficient in terms of cos, but they do their job quite well.

We may need some standard reference to the matrices (problems) in order to compare results from different authors. Here are something that I would like to suggest:

  1. We should have fixed right-hand side and exact solution to compare. These are in-cooperated in the above-mentioned codes;
  2. We should have fixed initial guess. I propose to choose the zero vector;
  3. I propose to take values of Re as the exponent of 10, i.e., 1, 10, 100, 1,000, 10,000, 100,000 and 1,000,000. They roughly represent problems from diffusion-dominated to convection-dominated. (My experience suggests that things change quickly between Re = 1,000 and Re = 10,000.
  4. We may choose the meshsize $h$ as 1/32, 1/64, 1/128, 1/256 and 1/512.

The test problems that I put here are of the well-known types. Although some high Reynolds number problems do not have a clear physical meaning, they do offer a challenge to many iterative solvers.

Useful information:

For problems and suggestions, send e-mail to:

Future plans: