On Fri, May 09, 2008 at 08:34:02AM +0100, Garth N. Wells wrote: > > > Anders Logg wrote: > > On Thu, May 08, 2008 at 09:52:36PM +0100, Garth N. Wells wrote: > >> DOLFIN wrote: > >>> One or more new changesets pushed to the primary dolfin > >>> repository. A short summary of the last three changesets is > >>> included below. > >>> > >>> changeset: 4179:fff523005c3840bc0428a9efec6fc49dbcd69789 tag: > >>> tip user: Anders Logg <[EMAIL PROTECTED]> date: Thu > >>> May 08 22:11:29 2008 +0200 files: ChangeLog > >>> dolfin/la/GMRES.cpp dolfin/la/GMRES.h dolfin/la/LU.cpp > >>> dolfin/la/LU.h dolfin/la/dolfin_la.h > >>> dolfin/swig/dolfin_docstrings.i dolfin/swig/dolfin_headers.i > >>> site-packages/dolfin/__init__.py description: Remove LU and GMRES > >>> classes, use solve instead > >>> > >> How can we create a default solver (e.g. LU) which is re-used? > >> > >> Garth > > > > You can do > > > > LUSolver solver; > > > > or > > > > KrylovSolver solver(gmres, amg); > > > > But I guess that's not what you mean? > > > > Yes, that's it. I mistakenly thought LUSolver was called LU.
ok. When I think of it, it would be very easy to make LinearSolver into a general solver class so that one can do LinearSolver solver(lu); solver.solve(A, x, b); solver.solve(A, x, b); or LinearSolver solver(gmres, ilu); solver.solve(A, x, b); solver.solve(A, x, b); This would require changing the meaning of the current LinearSolver class from being a base class for linear solvers to being a wrapper class (it would be very small and simple). The only place I think this is used right now is in the NewtonSolver, but I think it would be easy to modify the NewtonSolver. What do you think? -- Anders _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
