← Back to team overview

dolfin team mailing list archive

[HG] Cleans-ups for NonlinearPDE and NewtonSolver.

 

One or more new changesets pushed to the primary DOLFIN repository.
A short summary of the last three changesets is included below.

changeset:   1733:cd03f0e769c9bf8abe8ede0aa3833adb668b3218
tag:         tip
user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
date:        Fri Feb 24 17:47:49 2006 +0100
files:       src/demo/nls/Makefile.am src/demo/nls/Makefile.in src/demo/nls/nonlinearpoisson/main.cpp src/demo/nls/poisson/Makefile src/demo/nls/poisson/Poisson.form src/demo/nls/poisson/Poisson.h src/demo/nls/poisson/PoissonNl.form src/demo/nls/poisson/PoissonNl.h src/demo/nls/poisson/main.cpp src/kernel/form/NonlinearPDE.cpp src/kernel/nls/NewtonSolver.cpp src/kernel/nls/dolfin/NewtonSolver.h
description:
Cleans-ups for NonlinearPDE and NewtonSolver.

Remove src/demo/nls/poisson demo.


changeset:   1732:9059f1aeb57b9f1d598ec35e7b190350dedfe36c
user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
date:        Fri Feb 24 16:28:30 2006 +0100
files:       src/demo/pde/Makefile.am src/demo/pde/Makefile.in src/demo/pde/nonlinear/nonlinear-poisson/Makefile src/demo/pde/nonlinear/nonlinear-poisson/NonlinearPoisson.form src/demo/pde/nonlinear/nonlinear-poisson/NonlinearPoisson.h src/demo/pde/nonlinear/nonlinear-poisson/main.cpp src/kernel/form/LinearPDE.cpp src/kernel/form/Makefile.am src/kernel/form/Makefile.in src/kernel/form/NonlinearPDE.cpp src/kernel/form/PDE.cpp src/kernel/form/dolfin/GenericPDE.h src/kernel/form/dolfin/LinearPDE.h src/kernel/form/dolfin/Makefile.am src/kernel/form/dolfin/Makefile.in src/kernel/form/dolfin/NonlinearPDE.h src/kernel/form/dolfin/PDE.h src/kernel/form/dolfin/dolfin_form.h src/kernel/nls/Makefile.am src/kernel/nls/Makefile.in src/kernel/nls/NewtonSolver.cpp src/kernel/nls/NonlinearFunction.cpp src/kernel/nls/NonlinearPDE.cpp src/kernel/nls/NonlinearProblem.cpp src/kernel/nls/dolfin/Makefile.am src/kernel/nls/dolfin/Makefile.in src/kernel/nls/dolfin/NewtonSolver.h src/kernel/nls/dolfin/NonlinearFunction.h src/kernel/nls/dolfin/NonlinearPDE.h src/kernel/nls/dolfin/NonlinearProblem.h src/kernel/nls/dolfin/dolfin_nls.h src/kernel/parameter/dolfin/DefaultParameters.h
description:
PDE class can now solve nonlinear PDEs.

Nonlinear PDE's can be solved in a similar fashion to linear PDEs. The code below is from src/demo/pde/nonlinear/nonlinear-poisson.

Newton-Raphson steps increments inside PDE will be added later. 

 // Set up problem
  UnitSquare mesh(16, 16);
  MyFunction f;
  MyBC bc;
  Function u;

  // Create forms and nonlinear PDE
  NonlinearPoisson::BilinearForm a(u);
  NonlinearPoisson::LinearForm L(u, f);
  PDE pde(a, L, mesh, bc, PDE::nonlinear);


  // Solve nonlinear problem in a series of steps
  real dt = 1.0; real t  = 0.0; real T  = 3.0;
  f.sync(t);
  bc.sync(t);

  pde.set("Newton relative tolerance", 1e-6); 
  while( t < T)
  {
    t += dt;
    pde.solve(u);
  }


changeset:   1731:99f23a65ddd7a6afda9dece11e3fa69127146b82
user:        "Anders Logg <logg@xxxxxxxxx>"
date:        Wed Feb 22 17:11:28 2006 -0500
files:       src/kernel/form/PDE.cpp src/kernel/form/dolfin/LinearPDE.h src/kernel/form/dolfin/PDE.h
description:
Move inlined functions from PDE.h to PDE.cpp (don't need to be inlined).


-------------------------------------------------------
For more details, visit http://www.fenics.org/hg/dolfin