The program mlstest is an extensive example code demonstrating possibilities of usage of LASPack routines. It solves a Poisson problem in a 1D or 2D unit domain by a specified multilevel solver.
All input parameters have to be set interactively. The output contains the convergence history as well as the determined middle convergence rates.
For example, a three-grid solution by means of the V-cycle multigrid method with the Gauss-Seidel smoothing (two pre-smoothing and one post-smoothing iteration) and the ILU preconditioned CG method on the coarsest grid (20 iterations) yields for a grid on the finest level:
0. iteration ... accuracy = 1.0000e+00 1. iteration ... accuracy = 4.3033e-02 2. iteration ... accuracy = 3.3534e-03 3. iteration ... accuracy = 2.8452e-04 4. iteration ... accuracy = 2.4934e-05 5. iteration ... accuracy = 2.2565e-06 6. iteration ... accuracy = 2.0996e-07 7. iteration ... accuracy = 1.9860e-08 8. iteration ... accuracy = 7.6893e-09 CPU time: 0.67 s Middle contraction rate referred to one iteration: 9.677e-02 referred to 1 s CPU time: 7.751e-13The input data corresponds in this case to: 2, 3, 64, 1, n, 1, 2, 2, 2, 1, 0, 1.0, 6, 20, 3, 1.0, 100, 1e-8.