← Back to team overview

dolfin team mailing list archive

Linear algebra suggestions

 

I have added a simple solver interface solve.h, which supplies a
single function

    solve(A, x, b);

This is to make the interface consistent with the assembly, so we have

    assemble(A, ...);
    assemble(b, ...);
    solve(A, x, b);

Before, we had FEM::assemble() and LU::solve(), but I think the above
looks cleaner. We would then have two free functions in DOLFIN, namely
assemble() and solve().

The solve() function creates the appropriate LUSolver object and then
calls its solve method.

My thinking is that we can provide a very simple interface to just
solving a linear system. When using an iterative method, you probably
anyway want to specify preconditioners etc, so then the extra step of
creating a solver object is not in the way:

    KrylovSolver solver(KrylovMethod::gmres, Preconditioner::ilu);
    solver.solve(A, x, b);

If this sounds reasonable, I think we can remove the classes GMRES,
LU, LinearSolver, PETScLinearSolver, uBlasLinearSolver.

/Anders


Follow ups