[petsc-users] AMG for block matrices
Barry Smith
bsmith at petsc.dev
Wed Sep 23 18:32:41 CDT 2020
> On Sep 23, 2020, at 6:18 PM, Raju Mandhapati via petsc-users <petsc-users at mcs.anl.gov> wrote:
>
> Hello,
>
> Before jumping into block AMG, I started testing AMG on the pressure equation.
>
> I find that for simple systems, both serial and parallel version of AMG worked well. For a difficult system (variable coefficient laplacian operator), serial worked but AMG struggled when using 4 cores. I was using AMG as preconditioner to BiCGSTAB. Regular ILU0 preconditioner worked well both in serial and parallel. I am not sure why AMG struggled.
>
> Are there any tuning parameters for AMG?
>
> Does Petsc have SOR/Gauss Seidel/ILU0 smoother options? Or can I provide my own user smoother?
Run with -ksp_view to see what it is using.
Run with -help | grep mg_ and | grep gamg to see the options, there are too many to list here.
You can also look at the manual page for PCMG and PCGAMG
You can use any preconditioner/Krylov method combination as a smoother including your own (PCCreateShell()).
By default the smoother is Chebyshev Jacobi (where it runs CG or GMRES initially to get eigenvalue estimates).
We generally use GMRES with GAMG because when it works well it requires only a handful of Krylov iterations and when a handful is used GMRES is probably more efficient than BiCGSTAB.
>
> Are there options to choose between unsmoothed aggregation vs smoothed aggregation?
I think so, check with -help.
>
> thanks,
> Raju.
>
>
>
>
>
> On Tue, Sep 22, 2020 at 10:23 PM Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> wrote:
>
> Raju,
>
> If you call MatSetBlockSize(mat,4) then GAMG will keep the 4 variables together through all the levels.
>
> You might consider using the point block Jacobi smoother with it instead of the default Jacobi smoother -mg_levels_pc_type pbjacobi
>
> There is also PCPATCH which supports Vanka smoothing (though it is to well hidden) PCPatchSetConstructType(pc,PC_PATCH_VANKA) -pc_patch_construct_type vanka
>
>
> For coupled Navier stokes you might also consider using PCFIELDSPLIT and GAMG just for the pressure solve inside it.
>
> Barry
>
> > On Sep 22, 2020, at 9:24 PM, Raju Mandhapati via petsc-users <petsc-users at mcs.anl.gov <mailto:petsc-users at mcs.anl.gov>> wrote:
> >
> > Hello,
> >
> > Does Petsc have an option to solve block matrices using AMG solver/preconditioner. My block matrix is coming from solving u,v,w,p (coupled Navier stokes) at each cell.
> >
> > thanks
> > Raju.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200923/e733602a/attachment.html>
More information about the petsc-users
mailing list