On Tue, 21 Jan 2014 17:18:54 +0000 "Garth N. Wells" <gn...@cam.ac.uk> wrote:
> On 2014-01-21 17:01, Nikolaus Rath wrote: > > Hello, > > > > I noticed that the neumann-poisson demo > > (http://fenicsproject.org/documentation/dolfin/1.3.0/python/demo/documented/neumann-poisson/python/documentation.html) > > fails when using a different solver, e.g. when replacing > > > > solve(a == L, w) > > > > with > > > > solve(a == L, w, > > solver_parameters = {'linear_solver': 'cg', > > 'preconditioner': 'ilu'}) > > > > This problem needs very careful treatment when using iterative > solvers. Simple block-box preconditioners and solvers will very > likely fail. AMG preconditioning based on operator (inner(grad(u), grad(v)) + c*d)*dx could perform well. This operator does not have a dense row like the original one. This is a strategy similar to demo_stokes-iterative. Jan > > Garth > > > The error that I'm getting with FEniCS 1.3 is: > > > > $ python demo_neumann-poisson.py > > Solving linear variational problem. > > Solving linear system of size 4226 x 4226 (PETSc Krylov solver). > > Traceback (most recent call last): > > File "demo_neumann-poisson.py", line 68, in <module> > > 'preconditioner': 'ilu'}) > > File > > "/home/nikratio/.local/FEniCS/lib/python2.7/site-packages/dolfin/fem/solving.py", > > line 268, in solve > > _solve_varproblem(*args, **kwargs) > > File > > "/home/nikratio/.local/FEniCS/lib/python2.7/site-packages/dolfin/fem/solving.py", > > line 297, in _solve_varproblem > > solver.solve() > > RuntimeError: > > > > *** > > ------------------------------------------------------------------------- > > *** DOLFIN encountered an error. If you are not able to resolve > > this issue > > *** using the information listed below, you can ask for help at > > *** > > *** fenics@fenicsproject.org > > *** > > *** Remember to include the error message listed below and, if > > possible, > > *** include a *minimal* running example to reproduce the error. > > *** > > *** > > ------------------------------------------------------------------------- > > *** Error: Unable to solve linear system using PETSc Krylov > > solver. *** Reason: Solution failed to converge in 2 iterations > > (PETSc reason DIVERGED_INDEFINITE_PC, residual norm ||r|| = > > 1.541789e+19). *** Where: This error was encountered inside > > PETScKrylovSolver.cpp. *** Process: 0 > > *** > > *** DOLFIN version: 1.3.0 > > *** Git changeset: > > *** > > ------------------------------------------------------------------------- > > > > > > Bug or user error? > > > > > > Best, > > Nikolaus > > > > _______________________________________________ > > fenics mailing list > > fenics@fenicsproject.org > > http://fenicsproject.org/mailman/listinfo/fenics > _______________________________________________ > fenics mailing list > fenics@fenicsproject.org > http://fenicsproject.org/mailman/listinfo/fenics _______________________________________________ fenics mailing list fenics@fenicsproject.org http://fenicsproject.org/mailman/listinfo/fenics