[petsc-users] Elliptic operator with Neumann conditions

Marco Cisternino marco.cisternino at optimad.it
Wed Feb 7 15:13:55 CST 2018


Barry, thanks a lot!
Exactly what I wanted to understand and clearly explained.
Again thank you very much.

Marco

Ottieni Outlook per Android<https://aka.ms/ghei36>

________________________________
From: Smith, Barry F. <bsmith at mcs.anl.gov>
Sent: Wednesday, February 7, 2018 8:24:22 PM
To: Marco Cisternino
Cc: petsc-users
Subject: Re: [petsc-users] Elliptic operator with Neumann conditions


   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.

   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<http://www.optimad.it>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180207/295fcec3/attachment.html>


More information about the petsc-users mailing list