← Back to team overview

dolfin team mailing list archive

Re: -Make FEM:nzsize public [...]

 

Quoting Anders Logg <logg@xxxxxxxxx>:

> Great to see that it works!
> 
> Some suggestions/thoughts:
> 
>  - Maybe we could change the interface of NonlinearSolver to
> 
>    /// Solve nonlinear problem F(x) = 0
>    uint solve(NonlinearFunction& F, Vector& x);
> 
>    so it looks more like the other solvers?

Sure.

> 
>  - Maybe the class NonlinearFunction should not know anything about
>    meshes and forms? It could just represent a nonlinear function
>    and have two virtual functions F() and J() that a user can
>    overload:
> 
>    class MyNonlinearFunction : public NonlinearFunction
>    {
>    public:
>        ... F();
>        ... J();
>    };

Need to think about how to do this best. The problem is that PETSc needs
pointers to functions that update the function F(u) and the Jacobian, and the
argument list is fixed by PETSc. Playing with this can be tricky. I want to keep
it simple for the user to define the update function, without worrying about
PETSc (or even being aware of it) or the technicalities of applying boundary
conditions within the iterative process. 

> 
>    The functionality for PDEs can be put in a subclass of
>    NonlinearFunction that we could call NonlinearPDE, or maybe
>    just PDE if we assume that it is nonlinear in general.
> 
>    The nonlinear solver could then be used for other problems than
>    PDEs, for example in the ODE solvers.

Good idea. I'll work on it.

Garth
> 
> /Anders
> 
> On Tue, Nov 01, 2005 at 10:42:14AM +0100, dolfin@xxxxxxxxxx wrote:
> > Commit from garth (2005-11-01 10:42 CET)
> > -----------------
> > 
> > -Make FEM:nzsize public
> > -Nonlinear solver is now working. Equations of the form F(u)=0 can be
> solved. Will add demo soon.
> > 
> > Nonlinear solver still requires some clean up. Issues include:
> > - More general initialisation required.
> > - Allow user to specify parameters for the Newton procedure.
> > - Allow user to set parameters for the iterative solver (what's the plan
> for the GMRES class?).
> > - Inhomogeneous Dirichlet boundary conditions. Some new functions are
> required in the class FEM to do this.
> > - Addition of an incremental Newton procedure. PETSc functions exist for
> this.
> > 
> >   dolfin  src/kernel/fem/dolfin/FEM.h                1.19
> >   dolfin  src/kernel/nls/NonlinearFunction.cpp       1.2
> >   dolfin  src/kernel/nls/NonlinearSolver.cpp         1.11
> >   dolfin  src/kernel/nls/dolfin/NonlinearFunction.h  1.2
> >   dolfin  src/kernel/nls/dolfin/NonlinearSolver.h    1.8
> > 
> > _______________________________________________
> > 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
> 



Follow ups

References