A Software Package for Generating Test Matrices for the ConvectionDiffusion
Equations
Version 1.0, July 1997
Department of Computer Science
University of Kentucky
Lexington, KY 405060046, USA
ConvectionDiffusion Test Problems
Test problems (matrices) for multigrid method and other iterative methods.
The convectiondiffusion equation is of the form
[Uxx + Uyy + Re( p(x,y)Ux + q(x,y)Uy )] = f(x,y),
where Re is the socalled Reynolds number. This equation
offers some simple but nontrivial
test problems for iterative linear system solvers. In the context of
multigrid methods, some geometric, algebraic multigrid methods, and
multigrid methods with the socalled matrixdependent gridtransfer
operators have been designed and tested for solving the
convectiondiffusion 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:

the 2ndorder 5point central difference scheme;

the 4thorder 9point compact difference scheme; and

the 1storder 5point upwind difference scheme.
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
HarwellBoeing sparse matrix format.
I just put the Fortran source codes online
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:

We should have fixed righthand side and exact solution to compare. These
are incooperated in the abovementioned codes;

We should have fixed initial guess. I propose to choose the zero vector;

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 diffusiondominated to convectiondominated.
(My experience suggests that things change quickly between Re = 1,000 and
Re = 10,000.

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 wellknown 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:

Multigrid Network of Craig Douglas, where you can find interesting
information on multigrid methods and some multigrid softwares;

Sparskit Package of Yousef Saad that provides basic toolkit for
sparse matrix computations, in particular, some useful routines to read
HarwellBoeing matrices;

Jun Zhang, author of this page, to whom you may offer some suggestions.
For problems and suggestions, send email to:
jzhang@cs.uky.edu.
Future plans:

If there is enough interest, code for generating matrices of 3D
convectiondiffusion equation will be put online;

A new page to publish results that provided by software authors and
practioners who solved some of these test matrices.
DISCLAIMER:

This page was created by
Jun Zhang as a voluntary service to the community
of iterative method researchers and practioners.
This software package comes with no warranty. The author
is not liable for any loss/damage or inconvenience caused
in the use of this software or any modification thereof.
You use it at your own risk.