tminres
|
MINRES is a Krylov subspace iterative method for the solution of large sparse symmetric (possibly indefinite) linear systems.
MINRES was first proposed by C.C. Paige and M.A. Saunders (1975).
It is based on Lanczos tridiagonalization. A symmetric positive definite preconditioner can be specified.
The present C++ implementation is based on the Matlab code by Michael Saunders (SOL and ICME, Stanford University), Chris Paige (School of Computer Science, McGill University) and Sou Cheng Choi (ICME, Stanford University) available at
http://www.stanford.edu/group/SOL/software/minres.html
The aim of tminres is to provide an efficient and portable implementation of the MINRES() algorithm.
tminres supports user-defined parallel and serial data structure for the description of vectors, linear operators, and preconditioners.
The abstract classes Vector_trait and Operator_trait define the signatures of the methods that the user-defined classes should provide.
Users can decide whenever to use static (templates) or dynamic (derivated classes) polymorphism in order to provide such interfaces.
Two concrete implementations of Vector_trait and Operator_trait are included in the code:
Serial code: A VectorSimple class implements the methods required by minres.
A detailed description of the MINRES() function interface is provided here.
To create this documentation:
$ make dox
To erase the documentation
$ make clean-dox
SerialExample:
To compile and execute the serial examples:
$ cd SerialExample $ make $ ./ex1.exe $ ./ex2.exe $ make clean
TrilinosExample:
In this example we show how to use Trilinos parallel vectors and matrices (Epetra_MultiVector and Epetra_CrsMatrix) with our minres code.
We consider a finite element discretization of the Stokes system in a cube. An algebraic multigrid block preconditioner is used.
To compile this examples you need to have a working installation of Trilinos (10.8 or above). The following packages of Trilinos are required: Epetra, EpetraExt, ML, Teuchos. The installation of Trilinos may require additional external libraries, such as Blas, Lapack, Metis.
To compile and execute the Trilinos examples you first need to edit the Makefile.in according to your system configuration and Trilinos compiling options.
$ cd TrilinosExample $ vi Makefile.in $ make $ mpirun -n XX ./ex1.exe $ make clean