Re: [petsc-users] GMRES for outer solver

2022-05-02 Thread Matthew Knepley
On Mon, May 2, 2022 at 3:09 PM Amneet Bhalla wrote: > > While trying to use -fp_trap with a debugger on a local system we used the > debug build of our and PETSc code and all solvers are working fine (left > and right PC and fgmres also) and no NaNs either. > Debugging code tends to initial all

Re: [petsc-users] GMRES for outer solver

2022-05-02 Thread Amneet Bhalla
While trying to use -fp_trap with a debugger on a local system we used the debug build of our and PETSc code and all solvers are working fine (left and right PC and fgmres also) and no NaNs either. Interrogating the optimized version of the code now… On Mon, May 2, 2022 at 11:11 AM Matthew

Re: [petsc-users] GMRES for outer solver

2022-05-02 Thread Matthew Knepley
On Mon, May 2, 2022 at 1:56 PM Amneet Bhalla wrote: > Thanks Matt and Barry. Since we are using MATSHELL, we printed max norm of > || b || and || A*x ||, the two things that have all the physics of the > problem. Both are coming out to be finite (no NANs). Perhaps there is a NaN > in PCSHELL.

Re: [petsc-users] GMRES for outer solver

2022-05-02 Thread Amneet Bhalla
Thanks Matt and Barry. Since we are using MATSHELL, we printed max norm of || b || and || A*x ||, the two things that have all the physics of the problem. Both are coming out to be finite (no NANs). Perhaps there is a NaN in PCSHELL. But this is counter-intuitive because the true residual norm ||

Re: [petsc-users] GMRES for outer solver

2022-05-02 Thread Barry Smith
> On May 2, 2022, at 8:12 AM, Matthew Knepley wrote: > > On Mon, May 2, 2022 at 12:23 AM Ramakrishnan Thirumalaisamy > mailto:rthirumalaisam1...@sdsu.edu>> wrote: > Thank you. I have a couple of questions. I am solving the low Mach > Navier-Stokes system using a projection preconditioner

Re: [petsc-users] GMRES for outer solver

2022-05-02 Thread Matthew Knepley
On Mon, May 2, 2022 at 12:23 AM Ramakrishnan Thirumalaisamy < rthirumalaisam1...@sdsu.edu> wrote: > Thank you. I have a couple of questions. 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

Re: [petsc-users] GMRES for outer solver

2022-05-01 Thread Ramakrishnan Thirumalaisamy
As given in my previous email, when ksp_pc_type is "left", the residual norms are: Residual norms for stokes_ solve. 0 KSP preconditioned resid norm 8.829128536017e+04 true resid norm -nan ||r(i)||/||b|| -nan 1 KSP preconditioned resid norm 1.219313641627e+00 true resid norm

Re: [petsc-users] GMRES for outer solver

2022-05-01 Thread Ramakrishnan Thirumalaisamy
Sorry. There is a typo in my previous email. It should be ksp_pc_side. Regards, Rama On Sun, May 1, 2022 at 9:23 PM Ramakrishnan Thirumalaisamy < rthirumalaisam1...@sdsu.edu> wrote: > Thank you. I have a couple of questions. I am solving the low Mach > Navier-Stokes system using a projection

Re: [petsc-users] GMRES for outer solver

2022-05-01 Thread Ramakrishnan Thirumalaisamy
Thank you. I have a couple of questions. 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”: Linear stokes_ solve did not

Re: [petsc-users] GMRES for outer solver

2022-05-01 Thread Dave May
On Sun 1. May 2022 at 07:03, Amneet Bhalla wrote: > How about using a fixed number of Richardson iterations as a Krylov > preconditioner to a GMRES solver? > That is fine. Would that lead to a linear operation? > Yes. > On Sat, Apr 30, 2022 at 8:21 PM Jed Brown wrote: > >> In general, no.

Re: [petsc-users] GMRES for outer solver

2022-04-30 Thread Amneet Bhalla
How about using a fixed number of Richardson iterations as a Krylov preconditioner to a GMRES solver? Would that lead to a linear operation? On Sat, Apr 30, 2022 at 8:21 PM Jed Brown wrote: > In general, no. A fixed number of Krylov iterations (CG, GMRES, etc.) is a > nonlinear operation. > > A

Re: [petsc-users] GMRES for outer solver

2022-04-30 Thread Jed Brown
In general, no. A fixed number of Krylov iterations (CG, GMRES, etc.) is a nonlinear operation. 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. Ramakrishnan Thirumalaisamy writes: > Hi, > >

[petsc-users] GMRES for outer solver

2022-04-30 Thread Ramakrishnan Thirumalaisamy
Hi, I have a Krylov solver with a preconditioner that is also a Krylov solver. I know I can use "fgmres" for the outer solver but can I use gmres for the outer solver with a fixed number of iterations in the Krylov preconditioners? Thanks, Rama