:orphan: # PCGAMG Geometric algebraic multigrid (AMG) preconditioner ## Options Database Keys - ***-pc_gamg_type -*** one of agg, geo, or classical - ***-pc_gamg_repartition -*** repartition the degrees of freedom across the coarse grids as they are determined - ***-pc_gamg_asm_use_agg -*** use the aggregates from the coasening process to defined the subdomains on each level for the PCASM smoother - ***-pc_gamg_process_eq_limit -*** `PCGAMG` will reduce the number of MPI ranks used directly on the coarse grids so that there are around equations on each process that has degrees of freedom - ***-pc_gamg_coarse_eq_limit -*** Set maximum number of equations on coarsest grid to aim for. - ***-pc_gamg_reuse_interpolation -*** when rebuilding the algebraic multigrid preconditioner reuse the previously computed interpolations (should always be true) - ***-pc_gamg_threshold[] - Before aggregating the graph `PCGAMG` will remove small values from the graph on each level (< 0 does no filtering) - ***-pc_gamg_threshold_scale -*** Scaling of threshold on each coarser grid if not specified ## Options Database Keys for Aggregation - ***-pc_gamg_agg_nsmooths -*** number of smoothing steps to use with smooth aggregation - ***-pc_gamg_square_graph -*** alias for pc_gamg_aggressive_coarsening (deprecated) - ***-pc_gamg_aggressive_coarsening -*** number of aggressive coarsening (MIS-2) levels from finest. ## Options Database Keys for Multigrid - ***-pc_mg_cycle_type -*** v or w, see `PCMGSetCycleType()` - ***-pc_mg_distinct_smoothup -*** configure the up and down (pre and post) smoothers separately, see PCMGSetDistinctSmoothUp() - ***-pc_mg_type -*** (one of) additive multiplicative full kascade - ***-pc_mg_levels -*** Number of levels of multigrid to use. GAMG has a heuristic so pc_mg_levels is not usually used with GAMG ## Notes To obtain good performance for `PCGAMG` for vector valued problems you must call `MatSetBlockSize()` to indicate the number of degrees of freedom per grid point call `MatSetNearNullSpace()` (or `PCSetCoordinates()` if solving the equations of elasticity) to indicate the near null space of the operator See [the Users Manual section on PCGAMG](sec_amg) for more details. ## See Also `PCCreate()`, `PCSetType()`, `MatSetBlockSize()`, `PCMGType`, `PCSetCoordinates()`, `MatSetNearNullSpace()`, `PCGAMGSetType()`, `PCGAMGAGG`, `PCGAMGGEO`, `PCGAMGCLASSICAL`, `PCGAMGSetProcEqLim()`, `PCGAMGSetCoarseEqLim()`, `PCGAMGSetRepartition()`, `PCGAMGRegister()`, `PCGAMGSetReuseInterpolation()`, `PCGAMGASMSetUseAggs()`, `PCGAMGSetUseParallelCoarseGridSolve()`, `PCGAMGSetNlevels()`, `PCGAMGSetThreshold()`, `PCGAMGGetType()`, `PCGAMGSetReuseInterpolation()`, `PCGAMGSetUseSAEstEig()` ## Level intermediate ## Location src/ksp/pc/impls/gamg/gamg.c ## Examples src/ksp/ksp/tutorials/ex4.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/gamg/gamg.c) [Index of all PC routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)