<html>
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 05:04:43 Wednesday, 22 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;} --></style>
</head>
<body 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_WORLD,PETSC_TRUE,0,PETSC_NULL_OBJECT,nullsp,ierr); CHKERRQ(ierr)<br>
call MatSetNullSpace(aa_sub(4),nullsp,ierr); CHKERRQ(ierr)<br>
call MatNullSpaceDestroy(nullsp,ierr); CHKERRQ(ierr)<br>
<br>
where aa_sub(4) corresponds to A11. This is called before<br>
begin/end mat assembly.<br>
<br>
Chris</p>
<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>
<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:image38eecd.PNG@e297fe68.47849e27" alt="LinkedIn"></a> <a href="http://www.youtube.com/marinmultimedia" target=""><img width="16" height="16" style="border: 0px Solid ; " src="cid:imagef3a480.PNG@bbda6cc1.419f4d4a" alt="YouTube"></a> <a href="https://twitter.com/MARIN_nieuws" target=""><img width="16" height="16" style="border: 0px Solid ; " src="cid:image9d5515.PNG@08e0df30.4c950c4c" alt="Twitter"></a> <a href="https://www.facebook.com/marin.wageningen" target=""><img width="16" height="16" style="border: 0px Solid ; " src="cid:imagec62fb8.PNG@3a5e0685.40b583db" 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/Software-seminar-in-Shanghai-for-the-first-time-March-28.htm" title="" target="" 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 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 4:47 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 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">+31 317 49 33 44</a> | mailto:<a href="mailto:C.Klaij@marin.nl">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/<wbr>News-items/H2020-marinergi-<wbr>project-launched.htm</a><br>
<br>
</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>