← Back to team overview

dolfin team mailing list archive

Re: [noreply@xxxxxxxxxxxxx: [Branch ~dolfin-core/dolfin/logg] Rev 6336: Big cleanup of setting/listing linear solver methods and preconditioners:]

 

This is great!

I have always thought we need to do something with this. However, I wonder if 
list_foo is the best name?

What bothers me is the "list". We have by purpose skipped most "get" from 
methods, as it is implicit for what you want. What with just:

  lu_methods (also see below), preconditioners

Also 

  [list_]methods, [list_]lu_methods and [list_]krylov_methods

might be amigous. What methods are we talking about? What with:

  solver_methods, lu_solver_methods, krylov_solver_methods

They are a bit lengthy but if we skip list they might work fine.

Johan


On Friday October 7 2011 06:20:46 Anders Logg wrote:
> I set out to fix this bug:
> 
>   https://bugs.launchpad.net/dolfin/+bug/868465
> 
> but things spread out and I ended up touching all the la files.
> I won't push this to trunk until I've done some more testing, but
> here's a summary of the changes:
> 
> 1. Each solver defines a set of available methods and preconditioners
> which can be accessed by
> 
>   FooLUSolver::list_methods()
> 
>   FooKrylovSolver::list_methods()
>   FooKrylovSolver::list_preconditioners()
> 
> 2. New global functions that list available methods and Krylov solvers
> for the currently chosen backend:
> 
>   list_lu_methods()
> 
>   list_krylov_methods()
>   list_preconditioners()
> 
>   list_solver_methods() = list_{lu + krylov}_methods
> 
> 3. Changes in all factory classes to handle the above
> 
> 4. Checks added to check whether a certain method is available and
> that the preconditioner is set to "none" when using a Krylov method.
> 
> The following output is printed when calling the above methods using
> the PETSc backend:
> 
> LU method     |  Description
> ---------------------------------------------------------------------------
> -- default       |  default LU solver
> umfpack       |  UMFPACK (Unsymmetric MultiFrontal sparse LU factorization)
> mumps         |  MUMPS (MUltifrontal Massively Parallel Sparse direct
> Solver) pastix        |  PaStiX (Parallel Sparse matriX package)
> spooles       |  SPOOLES (SParse Object Oriented Linear Equations Solver)
> superlu       |  SuperLU
> superlu_dist  |  Parallel SuperLU
> petsc         |  PETSc builtin LU solver
> 
> Krylov method  |  Description
> --------------------------------------------------------------
> default        |  default Krylov method
> cg             |  Conjugate gradient method
> gmres          |  Generalized minimal residual method
> minres         |  Minimal residual method
> tfqmr          |  Transpose-free quasi-minimal residual method
> richardson     |  Richardson method
> bicgstab       |  Biconjugate gradient stabilized method
> 
> Preconditioner    |  Description
> ---------------------------------------------------------------
> default           |  default preconditioner
> none              |  No preconditioner
> ilu               |  Incomplete LU factorization
> icc               |  Incomplete Cholesky factorization
> jacobi            |  Jacobi iteration
> bjacobi           |  Block Jacobi iteration
> sor               |  Successive over-relaxation
> additive_schwarz  |  Additive Schwarz
> amg               |  Algebraic multigrid
> hypre_amg         |  Hypre algebraic multigrid (BoomerAMG)
> hypre_euclid      |  Hypre parallel incomplete LU factorization
> hypre_parasails   |  Hypre parallel sparse approximate inverse
> ml_amg            |  ML algebraic multigrid
> 
> --
> Anders


Follow ups

References