[Trilinos-Users] GMRES solver

Heroux, Mike MHeroux at csbsju.edu
Fri Sep 13 11:01:05 MDT 2013


Hi Robert,

This is something Trilinos supports very well.  You can use either GMRES
from Belos or from AztecOO (Belos is the more modern design, while AztecOO
is still widely used and very usable).  They both work with either the
Tpetra or Epetra data class packages (again Tpetra is the more modern
design, while Epetra is mature and widely used).

Tpetra and Epetra both support an abstract operator interface that permits
users to define a derived class that implements the linear operator, or
the preconditioner or both for the GMRES solver in either Belos or AztecOO.

For simplicity, I suggest you start with the AztecOO+Epetra option.  The
ramp up to understanding is quite a bit lower than Belos+Tpetra and once
you get AztecOO+Epetra work, translating to Belos+Tpetra is fairly
straightforward.

But of course the choice is yours.

For a concrete example of using AztecOO+Epetra, look in the following
example directory:

Trilinos/packages/aztecoo/example/AztecOO_UserOpUserMat

The class Poisson2dOperator is what you want to mimic.  You will need to
define the Apply operator such that your FMM operator is applied to a
vector (or more specifically a multi vector, which in your case only needs
to work with a RHS since you are using GMRES for a single RHS).  If you
also want to provide your own preconditioner, there is some illustration
of that as well.

If you want to go the route of Belos+Tpetra, let us know and I will try to
find a similar example.

One reason to go with the Belos+Tpetra option, at least at some point, is
that this path will include scalable manycore capabilities in the near
future.

Mike

On 9/13/13 2:22 AM, "Robert Simpson" <Robert.Simpson.2 at glasgow.ac.uk>
wrote:

>Hi all,
>
>This question relates to Trilinos GMRES solvers for solving the linear
>system of equations Ax = b.
>
>In the code I am developing I use an algorithm called the Fast Multipole
>Method in tandem with the boundary element method. Using this algorithm,
>it is possible to generate the vector Ax (where x is the solution for the
>current iteration) very quickly. The algorithm never computes the matrix
>A explicitly.
>
>Looking through the Trilinos class documentation, all the GMRES classes I
>have looked at so far require the matrix A to be passed in during
>construction. I know that the GMRES algorithm can be written in such a
>way that the vector Ax is used as an input, but I'm struggling to see if
>this is possible using the Trilinos library. Does this type of GMRES
>solver exist in Trilinos?
>
>I believe that the GMRES algorithm is not too difficult to implement, so
>if all else fails, I may simply code my own solver.
>
>Many thanks for your help.
>
>Robert Simpson
>University of Glasgow
>
>
>
>
>
>_______________________________________________
>Trilinos-Users mailing list
>Trilinos-Users at software.sandia.gov
>http://software.sandia.gov/mailman/listinfo/trilinos-users




More information about the Trilinos-Users mailing list