<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 24, 2017 at 10:17 AM, Lawrence Mitchell <span dir="ltr"><<a href="mailto:lawrence.mitchell@imperial.ac.uk" target="_blank">lawrence.mitchell@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 24 Mar 2017, at 15:11, Klaij, Christiaan <<a href="mailto:C.Klaij@marin.nl">C.Klaij@marin.nl</a>> wrote:<br>
><br>
> I've written a small PETSc program that loads the four blocks,<br>
> constructs Sp, attaches the null space and solves with a random<br>
> rhs vector.<br>
><br>
> This small program replicates the same behaviour as the real<br>
> code: convergence in the preconditioned norm, stagnation in the<br>
> unpreconditioned norm.<br>
><br>
> But when I add a call to remove the null space from the rhs<br>
> vector ("MatNullSpaceRemove"), I do get convergence in both<br>
> norms! Clearly, the real code must somehow produce an<br>
> inconsistent rhs vector. So the problem is indeed somewhere else<br>
> and not in PCFieldSplit.<br>
<br>
</span>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...<br>
<br>
See the documentation here:<br>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatSetTransposeNullSpace.html#MatSetTransposeNullSpace" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>petsc-dev/docs/manualpages/<wbr>Mat/MatSetTransposeNullSpace.<wbr>html#MatSetTransposeNullSpace</a><br>
<br>
and<br>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatSetNullSpace.html#MatSetNullSpace" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>petsc-dev/docs/manualpages/<wbr>Mat/MatSetNullSpace.html#<wbr>MatSetNullSpace</a><br>
<br>
for more details on exactly what is going on.</blockquote><div><br></div><div>Ah, Lawrence is right. I had not considered passing in an inconsistent rhs. We could have FS propagate the transpose nullspace</div><div>as well (we don't do that now).</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
Lawrence</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>