Re: [petsc-users] Preconditioner in multigrid solver

2019-03-11 Thread Smith, Barry F. via petsc-users
> On Mar 11, 2019, at 9:42 AM, Pietro Benedusi via petsc-users > wrote: > > Dear Petsc team, > > I have a question about the setting up of a multigrid solver. > > I would like yo use a PCG smoother, preconditioned with a mass matrix, just > on the fine level. > But when add the line for

Re: [petsc-users] Preconditioner in multigrid solver

2019-03-11 Thread Mark Adams via petsc-users
You are giving all levels the same matrices (K & M). This code should not work. You are using LU as the smother. This will solve the problem immediately. If MG is setup correctly then you will just have zero residuals and corrections for the rest of the solve. And you set the relative tolerance

[petsc-users] Preconditioner in multigrid solver

2019-03-11 Thread Pietro Benedusi via petsc-users
Dear Petsc team, I have a question about the setting up of a multigrid solver. I would like yo use a PCG smoother, preconditioned with a mass matrix, just on the fine level. But when add the line for preconditioning the CG with the mass matrix my MG diverges. I have implemented the same