[petsc-users] Elliptic operator with Neumann conditions

Mark Adams mfadams at lbl.gov
Wed Feb 7 15:27:10 CST 2018


On Wed, Feb 7, 2018 at 2:24 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:

>
>    A square matrix with a null space results in an underdetermined system,
> that is a solution with more than one solution. The solutions can be
> written as    x + alpha_1 v_1 + ... alpha_n v_n where the v_n form an
> orthonormal basis for the null space and x is orthogonal to the null space.
>
>    When you provide the null space KSP Krylov methods find the norm
> minimizing solution (x) , that is it finds the x with the smallest norm
> that satisfies the system. This is exactly the same as saying you take any
> solution of the system and remove all the components in the directions of
> the null space.
>
>    If you do not provide the null space then the Krylov space may find you
> a solution that is not the norm minimizing solution, thus that solution has
> a component of the null space within it. What component of the null space
> in the solution depends on what you use for an initial guess and right hand
> side.
>

Additionally, assuming your initial guess is orthogonal to the null space,
of course, your solution can "float" away from roundoff error. This is what
you were seeing initially w/o the null space. As you saw you can just
project it out yourself but as Barry said it is better to let KSP do it.


>
>    When you have a preconditioner then things can get trickier because the
> preconditioner can (unless you remove them) components in the direction of
> the null space. These components can get amplified with each iteration of
> the Krylov method so it looks like the Krylov method is not converging
> since the norm of the solution is getting larger and larger (these larger
> components are in the null space.) This is why one should always provide
> the null space when solving singular systems with singular matrices.
>
>   Barry
>
>
> > On Feb 7, 2018, at 11:43 AM, Marco Cisternino <
> marco.cisternino at optimad.it> wrote:
> >
> > Hi everybody,
> > I would like to ask what solution is computed if I try to solve the
> linear system relative to the problem in subject without creating the null
> space.
> > I tried with and without the call to
> > MatNullSpaceCreate(m_communicator, PETSC_TRUE, 0, NULL, &nullspace);
> > and I get zero averaged solution with and the same solution plus a
> constant without.
> > How does PETSc  work in the second case?
> > Does it check the matrix singularity? And is it able to create the null
> space with the constant automatically?
> > Thanks.
> >
> >
> > Marco Cisternino, PhD
> > marco.cisternino at optimad.it
> > _______________________________
> > OPTIMAD Engineering srl
> > Via Giacinto Collegno 18, Torino, Italia.
> > +3901119719782
> > www.optimad.it
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180207/6369a4df/attachment-0001.html>


More information about the petsc-users mailing list