← Back to team overview

dolfin team mailing list archive

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

 

Quoting Johan Hoffman <jhoffman@xxxxxxxxxxx>:

> 
> Me neither is very familiar with the PETSc non-linear solvers. But if what
> you say is true, then I agree that it seems more reasonable at this point
> to wrap the linear algebra of PETSc rather than the non-linear solvers.
> 
> Apart from the difference in speed (10%), is there any additional
> functionality in the PETSc non-linear solvers that you miss in your Newton
> solver of 20 lines of code?

The PETSc solvers do have some extra functionality, but this isn't difficult to
implement. On the other hand, they lack some functionality which I will
eventually need (such as path following techniques), which would be much simpler
to implement using the linear algerbra wrappers only.

A good approach would be to implement our own Newton procedures, and set things
up such that users can use the PETSc nonlinear solvers without too much
difficulty if they are willing to call PETSc functions directly.

An interesting feature that PETSc does have the is the computation of
approximate Jacbian matrices. This feature seems to be under development still.

Garth

> 
> /Johan
> 
> 
> 
> >>
> >> /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/
> >>
> >> _______________________________________________
> >> DOLFIN-dev mailing list
> >> DOLFIN-dev@xxxxxxxxxx
> >> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> >>
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> >
> 
> 
> -- 
> Johan Hoffman, PhD
> Assistant Professor
> School of Computer Science and Communication
> Royal Institute of Technology KTH
> SE-100 44 Stockholm
> Sweden
> 
> Email: jhoffman@xxxxxxxxxxx
> URL: www.nada.kth.se/~jhoffman
> 
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 



Follow ups

References