dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #03038
Re: LU, GMRES and preconditioners
On Tue, Aug 15, 2006 at 01:38:42PM +0200, Garth N. Wells wrote:
> Anders Logg wrote:
> > I'd like to change the behaviour of classes LU and GMRES so that one
> > may do
> >
> > Matrix A;
> > Vector x, b;
> >
> > GMRES::solve(A, x, b);
> >
> > or
> >
> > GMRES::solve(A, x, b, Preconditioner::ilu);
> >
> > and
> >
> > LU::solve(A, x, b);
> >
> > LU and GMRES would thus not be subclasses or typedefs of
> > PETSc/uBlasLU/KrylovSolver but instead simple classes with static
> > functions for simple solution of linear systems. This would then be
> > the fast and easy way to solve a linear system. For more advanced
> > usage, one would create a KrylovSolver or PETScKrylovSolver and then
> > call solver.solve(). But often, one only wants to solve one linear
> > system and not many and then it's convenient to skip the extra step of
> > creating the solver.
> >
>
> OK with me.
ok. I can fix this (if it works out with the preconditioners).
> > This connects to the design of preconditioners. I think we decided to
> > put the list of preconditioners in Preconditioner so this should be
> > ok. What's the status of the redesign of preconditioners?
> >
>
> I don't that think we settled on the design of the preconiditoners. It
> would be nice to have just one enum list of preconditioners in
> Preconditioner.h, but I haven't had time to look at it yet.
ok. Would it be enough to have a class Preconditioner which just lists
all available preconditioners by name (ilu etc) in an enum type? And
then the solvers just return a run-time error if the preconditioner is
not implemented.
/Anders
Follow ups
References