On Tue, 21 Jan 2014 09:01:47 -0800 Nikolaus Rath <[email protected]> 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'}) > > 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 > *** > *** [email protected] > *** > *** 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? Bilinear form is not positive definite. Use MINRES method with no preconditioner. (I'm not sure which preconditioner is suitable. Jacobi also works.) solve(a == L, w, solver_parameters = {'linear_solver': 'minres', 'preconditioner': 'none'}) Jan > > > Best, > Nikolaus > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
