<div dir="auto">Sorry. There is a typo in my previous email. It should be ksp_pc_side. </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Rama</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 1, 2022 at 9:23 PM Ramakrishnan Thirumalaisamy <<a href="mailto:rthirumalaisam1857@sdsu.edu">rthirumalaisam1857@sdsu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">Thank you. I have a couple of questions. <span style="font-family:"Helvetica Neue";font-size:13px">I am solving the low Mach Navier-Stokes system using a projection preconditioner (pc_shell type) with GMRES being the outer solver and Richardson being the Krylov preconditioner. The solver diverges when ksp_pc_type is "right”: </span><div><font face="Helvetica Neue" style="font-family:"Helvetica Neue";color:rgb(0,0,0)"><br></font></div><div>Linear stokes_ solve did not converge due to DIVERGED_NANORINF iterations 0<div><span style="font-family:"Helvetica Neue";font-size:13px"><br></span></div><div><span style="font-family:"Helvetica Neue";font-size:13px">and it converges when ksp_pc_type is "left":</span></div><div><font face="Helvetica Neue" style="font-family:"Helvetica Neue";color:rgb(0,0,0)"><br></font></div><div>Residual norms for stokes_ solve.<br>  0 KSP preconditioned resid norm 8.829128536017e+04 true resid norm           -nan ||r(i)||/||b||           -nan<br>  1 KSP preconditioned resid norm 1.219313641627e+00 true resid norm           -nan ||r(i)||/||b||           -nan<br>  2 KSP preconditioned resid norm 8.547033285706e-12 true resid norm           -nan ||r(i)||/||b||           -nan<br>Linear stokes_ solve converged due to CONVERGED_RTOL iterations 2<font face="Helvetica Neue" style="font-family:"Helvetica Neue";color:rgb(0,0,0)"><br></font><div><br></div><div><span style="font-family:"Helvetica Neue";font-size:13px"> I am curious to know why this is happening. The solver also diverges with "FGMRES" as the outer solver (which supports only right preconditioning). </span></div></div></div><div><span style="font-family:"Helvetica Neue";font-size:13px"><br></span></div><div><span style="font-family:"Helvetica Neue";font-size:13px">2. Is it also possible to not get "-nan" when || b || = 0?</span></div><div><span style="font-family:"Helvetica Neue";font-size:13px"><br></span></div><div><span style="font-family:"Helvetica Neue";font-size:13px"><br></span></div><div><span style="font-family:"Helvetica Neue";font-size:13px">Regards,</span></div><div><span style="font-family:"Helvetica Neue";font-size:13px">Rama </span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 1, 2022 at 12:12 AM Dave May <<a href="mailto:dave.mayhem23@gmail.com" target="_blank">dave.mayhem23@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Sun 1. May 2022 at 07:03, Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">How about using a fixed number of Richardson iterations as a Krylov preconditioner to a GMRES solver? </div></blockquote><div dir="auto"><br></div><div dir="auto">That is fine.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">Would that lead to a linear operation? </div></blockquote><div dir="auto"><br></div><div dir="auto">Yes.</div><div dir="auto"><br></div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto"></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 30, 2022 at 8:21 PM Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">In general, no. A fixed number of Krylov iterations (CG, GMRES, etc.) is a nonlinear operation.<br>
<br>
A fixed number of iterations of a method with a fixed polynomial, such as Chebyshev, is a linear operation so you don't need a flexible outer method. <br>
<br>
Ramakrishnan Thirumalaisamy <<a href="mailto:rthirumalaisam1857@sdsu.edu" target="_blank">rthirumalaisam1857@sdsu.edu</a>> writes:<br>
<br>
> Hi,<br>
><br>
> I have a Krylov solver with a preconditioner that is also a Krylov solver.<br>
> I know I can use "fgmres" for the outer solver but can I use gmres for the<br>
> outer solver with a fixed number of iterations in the Krylov<br>
> preconditioners?<br>
><br>
><br>
> Thanks,<br>
> Rama<br>
</blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>--Amneet <br><br></div><div><br></div><div><br></div></div></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>