[petsc-users] left and right preconditioning with a constant null space
Lawrence Mitchell
lawrence.mitchell at imperial.ac.uk
Fri Mar 24 10:17:55 CDT 2017
> 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.
Lawrence
More information about the petsc-users
mailing list