Exactly, it was implicitly stated. Then CG should work since is spd on the
space orthogonal to the kernel.

Or, fix a point, and then shift the solution with its average.

Without the knowledge of the nullspace you can either use minres or symmlq
(or the new minres-qlp) on the neumann problem,
but I don't really know how to choose the preconditioner (maybe the same
problem with a fixed point?)

On the augmented problem, I would use a direct solver :D

By the way, I really open to suggestions since I'm facing similar issues on
a nonlinear mechanical problem (and the nullspace is not available).


 Simone


2014/1/21 Kent-Andre Mardal <kent-...@simula.no>

>
>
> On Tuesday, 21 January 2014, Simone Pezzuto <junki....@gmail.com> wrote:
>
>> 2014/1/21 Jan Blechta <blec...@karlin.mff.cuni.cz>
>>
>>> 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.
>>>
>>>
>> In this case the preconditioner is singular (pure neumann), no it cannot
>> be used.
>>
>> As Garth was mentioning, this problem is delicate for iterative solver,
>> not only because
>> its indefiniteness, but because the Lagrangian constraint you're imposing
>> yields
>> a column (the last one) of the full matrix that belongs to the kernel of
>> the top-left block.
>>
>> Since the nullspace is at hands, I would provide it to the solver and
>> then use CG+AMG,
>> with Jacobi relaxation at coarser scale instead Gauss elimination (at
>> least with petsc boomeramg).
>>
>>  Simone
>>
>
> Providing the null space is perhaps  the best alternative, but then you do
> not need the lagrange multiplier. Instead you can remove the constant from
> the lhs and rhs before sending it to cg.
>
> Kent
>
>
>
>>
>>
>>>  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
>>>
>>
>>
_______________________________________________
fenics mailing list
fenics@fenicsproject.org
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to