[petsc-users] left and right preconditioning with a constant null space

Matthew Knepley knepley at gmail.com
Fri Mar 24 11:05:42 CDT 2017


On Fri, Mar 24, 2017 at 10:17 AM, Lawrence Mitchell <
lawrence.mitchell at imperial.ac.uk> wrote:

>
> > On 24 Mar 2017, at 15:11, Klaij, Christiaan <C.Klaij at marin.nl> wrote:
> >
> > I've written a small PETSc program that loads the four blocks,
> > constructs Sp, attaches the null space and solves with a random
> > rhs vector.
> >
> > This small program replicates the same behaviour as the real
> > code: convergence in the preconditioned norm, stagnation in the
> > unpreconditioned norm.
> >
> > But when I add a call to remove the null space from the rhs
> > vector ("MatNullSpaceRemove"), I do get convergence in both
> > norms! Clearly, the real code must somehow produce an
> > inconsistent rhs vector. So the problem is indeed somewhere else
> > and not in PCFieldSplit.
>
> OK, that makes sense.  If the right hand side is not consistent then you
> won't converge appropriately.  You can ask PETSc to remove the null space
> from the right hand side, but you must call MatSetTransposeNullSpace as
> well.  In the general case, the left and right null spaces are not the
> same...
>
> See the documentation here:
>
> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/
> Mat/MatSetTransposeNullSpace.html#MatSetTransposeNullSpace
>
> and
>
> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/
> Mat/MatSetNullSpace.html#MatSetNullSpace
>
> for more details on exactly what is going on.


Ah, Lawrence is right. I had not considered passing in an inconsistent rhs.
We could have FS propagate the transpose nullspace
as well (we don't do that now).

   Matt


>
> Lawrence




-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170324/b329cb5a/attachment.html>


More information about the petsc-users mailing list