← Back to team overview

dolfin team mailing list archive

Re: [HG] Cleanup KrylovSolver:

 

On Tue, 2006-03-14 at 18:02 +0100, 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:   1781:5d3af79f94f9ce03ec0d41053b697d493b4aa0dc
> tag:         tip
> user:        "Anders Logg <logg@xxxxxxxxx>"
> date:        Tue Mar 14 17:59:25 2006 -0500
> files:       src/demo/pde/stokes/taylor-hood/main.cpp src/kernel/fem/FEM.cpp src/kernel/la/GMRES.cpp src/kernel/la/KrylovSolver.cpp src/kernel/la/dolfin/GMRES.h src/kernel/la/dolfin/KrylovSolver.h src/kernel/ode/MultiAdaptiveNewtonSolver.cpp src/kernel/ode/dolfin/MultiAdaptiveNewtonSolver.h src/pydolfin/dolfin.py src/pydolfin/dolfin_wrap.cpp
> description:
> Cleanup KrylovSolver:
> 
>  - Remove setFoo() functions in public interface
>  - Cleanup and restructure implementation
> 
> Please check that everything looks ok. I think it the code is easier
> to follow now, but I may be wrong.
> 

Looks a lot nicer, and now solver parameters can be set through objects
which use use KrylovSolver (like PDE and NewtonSolver). To allow full
functionality, I think that LU should become a special case of a
KrylovSolver so that an LU solver can be chosen when using  PDE,
NewtonSolver or any other class which uses a solver. 

I see that the private member functions setSolver() and
setPreconditioner() are still there. They could be removed and the
necessary code placed in KrylovSolver::init(..). Alternatively, they
could be kept and called from within KrylovSolver::init(..) rather than
KrylovSolver::solve(..).

Garth

> In particular, check that everything works wrt boo set_pc (I removed it).
> 
> 
> changeset:   1780:31c46507cb7395628ee19ec8baf828e3f65790c2
> user:        "Anders Logg <logg@xxxxxxxxx>"
> date:        Mon Mar 13 23:39:42 2006 -0500
> files:       ChangeLog src/kernel/la/KrylovSolver.cpp src/kernel/la/dolfin/KrylovSolver.h src/kernel/ode/MonoAdaptiveNewtonSolver.cpp src/kernel/ode/MultiAdaptiveNewtonSolver.cpp src/kernel/parameter/dolfin/DefaultParameters.h src/modules/stokes/StokesSolver.cpp src/pydolfin/dolfin.py src/pydolfin/dolfin_wrap.cpp
> description:
> - Remove KrylovSolver::setRtol() etc., replaced by parameters.
> - Zero pivot drop tolerance removed, use KrylovSolver::solver()
>   to get the PETSc KSP pointer for advanced options
> 
> 
> changeset:   1779:2c67dd15fad7eab899e3e65d905039d4176a1eb8
> user:        "Anders Logg <logg@xxxxxxxxx>"
> date:        Mon Mar 13 23:07:36 2006 -0500
> files:       src/kernel/la/KrylovSolver.cpp src/kernel/la/dolfin/KrylovSolver.h src/kernel/la/dolfin/LU.h src/kernel/parameter/dolfin/DefaultParameters.h src/kernel/pde/LinearPDE.cpp
> description:
> Add new global parameters for Krylov solver:
> 
>     "Krylov relative tolerance"  1e-9
>     "Krylov absolute tolerance"  1e-20
>     "Krylov divergence limit"    1e4
>     "Krylov maximum iterations"  10000
>     "Krylov report iterations"   true
>     "Krylov monitor convergence" false
> 
> Old function setRtol() etc still there but will be removed
> 
> 
> -------------------------------------------------------
> For more details, visit http://www.fenics.org/hg/dolfin
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev




Follow ups

References