← Back to team overview

dolfin team mailing list archive

Re: Updates to nls demos. [...]

 

I'm not very familiar with the Newton solvers in PETSc.

If the speedup is only 10% and you have to sacrifice a lot of
flexibility, maybe we may as well do it ourselves. In particular since
your hand-coded Newton is about 20 lines of code and just the wrapper
code for calling the PETSc Newton solver is much longer.

/Anders


On Fri, Dec 02, 2005 at 05:14:11PM +0100, dolfin@xxxxxxxxxx wrote:
> Commit from garth (2005-12-02 17:14 CET)
> -----------------
> 
> Updates to nls demos.
> 
> The nonlinear solver demos solve using both the class NonlinearSolver (which exploits the PETSc Newton solvers) and a hand programmed Newton procedure. The PETSc solvers are typically about 10% faster for the tests I've done. However, the NonlinearSolver class and the interface to it would be simpler if I programmed the NewtonSolver, and just relied on the existing linear algerbra wrappers for PETSc vectors, matrices and linear solvers. I think that this would be better given that the speed-up using the PETSc solver is not so large, we could probably equal it with some with some optimisations. Also, we then restrict PETSc to the linear algerbra classes, limiting the intrusion of PETSc into DOLFIN. Are there reasons to stick with the PETSc Newton solvers that I might be missing?
> 
> Garth
> 
>   dolfin  src/demo/nls/nonlinearpoisson/main.cpp  1.2
>   dolfin  src/demo/nls/poisson/main.cpp           1.2
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 

-- 
Anders Logg
Research Assistant Professor
Toyota Technological Institute at Chicago
http://www.tti-c.org/logg/



Follow ups

References