<html>
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 09:42:48 Thursday, 23 March 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} P{margin-top:0;margin-bottom:0;}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<p>Matt, Lawrence</p>
<p><br>
The same problem happens when using gmres with rtol 1e-6 in the<br>
schur complement (attachment "left_schur"). I'm not sure what<br>
this tells us. If I understand Lawrence correctly, the null space<br>
may be attached to the wrong matrix (A11 instead of Sp)?<br>
</p>
<p><br>
Chris<br>
</p>
<div style="color: rgb(33, 33, 33);"></div>
<br>
<font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;">dr. ir.</font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;">
</font><font style="font-family: Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;">Christiaan</font><font style="font-family: Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;">
</font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;">Klaij</font><font size="3" face="Segoe UI"></font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;"> |
</font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;">Senior Researcher</font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;"> |
</font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;font-weight:bold;">Research & Development</font><br>
<font style="font-family:Verdana;font-size:9pt;color:#7D7D7D;font-weight:bold;">MARIN</font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;"> | T
</font><font style="font-family:Verdana;font-size:8pt;color:#7D7D7D;">+31 317 49 33 44</font><font color="#7d7d7d" size="2" face="Segoe UI"></font><font style="font-family:Verdana;font-size:8pt;"> |
</font><span style="font-family:Verdana;font-size:8pt;"><a href="mailto:C.Klaij@marin.nl" title="" target="" style="font-family:Verdana;font-size:8pt;"><span style="font-family:Verdana; font-size:8pt;">C.Klaij@marin.nl</span></a></span><font color="#7d7d7d" size="2" face="Segoe UI"></font><font style="font-family:Verdana;font-size:8pt;"> |
</font><span style="font-family:Verdana;font-size:8pt;"><a href="http://www.marin.nl" title="" target="" style="font-family:Verdana;font-size:8pt;"><span style="font-family:Verdana; font-size:8pt;">www.marin.nl</span></a></span><br>
<br>
<a href="https://www.linkedin.com/company/marin" target=""><img width="16" height="16" style="border: 0px Solid ; " src="cid:imagebda5f2.PNG@e7054e2e.4bb843ba" alt="LinkedIn"></a> <a href="http://www.youtube.com/marinmultimedia" target=""><img width="16" height="16" style="border: 0px Solid ; " src="cid:image41c9af.PNG@a402a401.499f8687" alt="YouTube"></a> <a href="https://twitter.com/MARIN_nieuws" target=""><img width="16" height="16" style="border: 0px Solid ; " src="cid:imagec69863.PNG@894aa99c.4099870f" alt="Twitter"></a> <a href="https://www.facebook.com/marin.wageningen" target=""><img width="16" height="16" style="border: 0px Solid ; " src="cid:imagefefa51.PNG@b22b81ff.4ba73667" alt="Facebook"></a><br>
<font style="FONT-FAMILY: Verdana; FONT-SIZE: 8pt" color="#7d7d7d" size="2" face="Verdana">MARIN news:
<font style="font-family:Verdana;font-size:8pt;"><span style="font-family:Verdana;font-size:8pt;"><a href="http://www.marin.nl/web/News/News-items/Project-Manager-Veiligheids-en-Verkeersstudies-en-Specialist-Human-Performance.htm" title="" target="" style="font-family:Verdana;font-size:8pt;"><span style="font-family:Verdana; font-size:8pt;">Project
 Manager Veiligheids- en Verkeersstudies en Specialist Human Performance</span></a></span></font></font>
<p></p>
<p></p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Matthew Knepley <knepley@gmail.com><br>
<b>Sent:</b> Wednesday, March 22, 2017 5:39 PM<br>
<b>To:</b> Klaij, Christiaan<br>
<b>Cc:</b> petsc-users@mcs.anl.gov<br>
<b>Subject:</b> Re: [petsc-users] left and right preconditioning with a constant null space</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Mar 22, 2017 at 4:04 PM, Klaij, Christiaan <span dir="ltr">
<<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<p>Thanks Matt, I will try your suggestion and let you know. In the<br>
meantime this is what I did to set the constant null space:<br>
<br>
call MatNullSpaceCreate(MPI_COMM_<wbr>WORLD,PETSC_TRUE,0,PETSC_NULL_<wbr>OBJECT,nullsp,ierr); CHKERRQ(ierr)<br>
call MatSetNullSpace(aa_sub(4),<wbr>nullsp,ierr); CHKERRQ(ierr)<br>
call MatNullSpaceDestroy(nullsp,<wbr>ierr); CHKERRQ(ierr)<br>
<br>
where aa_sub(4) corresponds to A11. This is called before<br>
begin/end mat assembly.</p>
</div>
</blockquote>
<div>Hmm, I wonder if the problem is that A11 has the nullspace, but the PC pmat is actually B^T diag(A)^{-1} B. I have</div>
<div>to look where the solver is actually taking the nullspace from. We need to improve the -ksp_view output to make this</div>
<div>stuff much easier to see.</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">
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Chris</p>
<span class="">
<p><br>
</p>
<div style="color:rgb(33,33,33)"></div>
<br>
<font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold">dr. ir.</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold">
</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold">Christiaan</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold">
</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold">Klaij</font><font size="3" face="Segoe UI"></font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold"> |
</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold">Senior Researcher</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold"> |
</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d; font-weight:bold">Research & Development</font><br>
</span><font style="font-family:Verdana; font-size:9pt; color:#7d7d7d; font-weight:bold">MARIN</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d"> | T
</font><font style="font-family:Verdana; font-size:8pt; color:#7d7d7d"><a href="tel:+31%20317%20493%20344" value="+31317493344" target="_blank">+31 317 49 33 44</a></font><font size="2" face="Segoe UI" color="#7d7d7d"></font><font style="font-family:Verdana; font-size:8pt">
 | </font><span style="font-family:Verdana; font-size:8pt"><a href="mailto:C.Klaij@marin.nl" title="" target="_blank" style="font-family:Verdana; font-size:8pt"><span style="font-family:Verdana; font-size:8pt">C.Klaij@marin.nl</span></a></span><font size="2" face="Segoe UI" color="#7d7d7d"></font><font style="font-family:Verdana; font-size:8pt"> |
</font><span style="font-family:Verdana; font-size:8pt"><a href="http://www.marin.nl" title="" target="_blank" style="font-family:Verdana; font-size:8pt"><span style="font-family:Verdana; font-size:8pt">www.marin.nl</span></a></span><br>
<br>
<a href="https://www.linkedin.com/company/marin" target="_blank"><img alt="LinkedIn" style="border:0px Solid" width="16" height="16" src="cid:image38eecd.PNG@e297fe68.47849e27"></a> <a href="http://www.youtube.com/marinmultimedia" target="_blank"><img alt="YouTube" style="border:0px Solid" width="16" height="16" src="cid:imagef3a480.PNG@bbda6cc1.419f4d4a"></a> <a href="https://twitter.com/MARIN_nieuws" target="_blank"><img alt="Twitter" style="border:0px Solid" width="16" height="16" src="cid:image9d5515.PNG@08e0df30.4c950c4c"></a> <a href="https://www.facebook.com/marin.wageningen" target="_blank"><img alt="Facebook" style="border:0px Solid" width="16" height="16" src="cid:imagec62fb8.PNG@3a5e0685.40b583db"></a><br>
<font style="font-family:Verdana; font-size:8pt" size="2" face="Verdana" color="#7d7d7d">MARIN news:
<font style="font-family:Verdana; font-size:8pt"><span style="font-family:Verdana; font-size:8pt"><a href="http://www.marin.nl/web/News/News-items/Software-seminar-in-Shanghai-for-the-first-time-March-28.htm" title="" target="_blank" style="font-family:Verdana; font-size:8pt"><span style="font-family:Verdana; font-size:8pt">Software
 seminar in Shanghai for the first time, March 28</span></a></span></font></font>
<p></p>
<p></p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block; width:98%">
<div id="m_8210822296635488072divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, March 22, 2017 4:47 PM<br>
<b>To:</b> Klaij, Christiaan<br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] left and right preconditioning with a constant null space</font>
<div> </div>
</div>
<div>
<div class="h5">
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Mar 22, 2017 at 2:58 PM, Klaij, Christiaan <span dir="ltr">
<<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
I'm solving the Navier-Stokes equations using PCFieldSplit type<br>
Schur and Selfp. This particular case has only Neumann conditions<br>
for the pressure field.<br>
<br>
With left preconditioning and no nullspace, I see that the KSP<br>
solver for S does not converge (attachment "left_nonullsp") in<br>
either norm.<br>
<br>
When I attach the constant null space to A11, it gets passed on<br>
to S and the KSP solver for S does converge in the preconditioned<br>
norm only (attachment "left").<br>
<br>
However, right preconditioning uses the unpreconditioned norm and<br>
therefore doesn't converge (attachment "right"), regardless of<br>
whether the nullspace is attached or not. Should I conclude that<br>
right preconditioning cannot be used in combination with a null<br>
space?<br>
</blockquote>
<div><br>
</div>
<div>No, neither of your solves is working. The left preconditioned version is just hiding that fact.</div>
<div><br>
</div>
<div>You should start by checking that the exact solve works. Namely full Schur factorization</div>
<div>with exact solves for A and S. Since you do not have a matrix for S (unless you tell it do</div>
<div>use "full"), just use a very low (1e-10) tolerance. My guess is that something is off with</div>
<div>your null space specification.</div>
<div><br>
</div>
<div>  Thanks,</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">
Chris<br>
<br>
<br>
dr. ir. Christiaan Klaij  | Senior Researcher | Research & Development<br>
MARIN | T <a href="tel:%2B31%20317%2049%2033%2044" value="+31317493344" target="_blank">
+31 317 49 33 44</a> | mailto:<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a> |
<a href="http://www.marin.nl" rel="noreferrer" target="_blank">http://www.marin.nl</a><br>
<br>
MARIN news: <a href="http://www.marin.nl/web/News/News-items/H2020-marinergi-project-launched.htm" rel="noreferrer" target="_blank">
http://www.marin.nl/web/News/N<wbr>ews-items/H2020-marinergi-proj<wbr>ect-launched.htm</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_8210822296635488072gmail_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>
</div>
</div>
</div>
</div>
<u></u>
<p></p>
<u></u><u></u><u></u></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="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>
</div>
</div>
</EXCLAIMER:ORIGINAL_BODY_AFTER>
<p></p>
</EXCLAIMER:TEXT_ONLY></EXCLAIMER:AD></EXCLAIMER:AD>
</body>
</html>