PCGAMG#
Geometric algebraic multigrid (AMG) preconditioner
Options Database Keys#
-pc_gamg_type type (agg|geo|classical) - see
PCGAMGType-pc_gamg_repartition (true|false) - repartition the degrees of freedom across the coarse grids as they are determined
-pc_gamg_asm_use_agg (true|false) - use the aggregates from the coarsening process to define the subdomains on each level for the
PCASMsmoother, this also forces using-mg_levels_pc_type asm-pc_gamg_process_eq_limit limit -
PCGAMGwill reduce the number of MPI processes used directly on the coarse grids so that there are around limit equations on each process that has degrees of freedom-pc_gamg_coarse_eq_limit limit - set maximum number of equations on coarsest grid to aim for
-pc_gamg_reuse_interpolation (true|false) - when rebuilding the algebraic multigrid preconditioner reuse the previously computed interpolations (should always be true)
-pc_gamg_threshold l0,l1,… - before aggregating the graph
PCGAMGwill remove small values from the graph on each level (< 0 does no filtering)-pc_gamg_threshold_scale scale - scaling of threshold on each coarser grid if not specified
Options Database Keys for Aggregation#
-pc_gamg_agg_nsmooths nsmooth - number of smoothing steps to use with smooth aggregation to construct prolongation
-pc_gamg_aggressive_coarsening n - number of aggressive coarsening (MIS-2 or square graph) levels from finest.
-pc_gamg_aggressive_square_graph (true|false) - use square graph (\(A^T A\)) for coarsening. Otherwise, MIS-k (k=2) is used, see
PCGAMGMISkSetAggressive()-pc_gamg_square[_i]_mat_product_algorithm algorithm -
MatProductAlgorithmto use when squaring the matrix for aggressive coarsening (on level i <n)-pc_gamg_mis_k_minimum_degree_ordering (true|false) - use minimum degree ordering in greedy MIS algorithm
-pc_gamg_asm_hem_aggs n - number of HEM aggregation steps for
PCASMsmoother-pc_gamg_aggressive_mis_k n - number (k) distance in MIS coarsening (>2 is ‘aggressive’)
Options Database Keys for Multigrid#
-pc_mg_cycle_type (v|w) - see
PCMGSetCycleType()-pc_mg_distinct_smoothup - configure the up and down (pre and post) smoothers separately, see
PCMGSetDistinctSmoothUp()-pc_mg_type (additive|multiplicative|full|kaskade) - see
PCMGType-pc_mg_levels levels - number of levels of multigrid to use;
PCGAMGhas a heuristic to determine the number of levels so this is not usually used withPCGAMG
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
The many options for PCMG also work directly for PCGAMG such as controlling the smoothers on each level etc.
See Also#
the Users Manual section on PCGAMG, the Users Manual section on PCMG, KSP: Linear System Solvers, PCCreate(), PCSetType(),
MatSetBlockSize(),
PCMGType, PCSetCoordinates(), MatSetNearNullSpace(), PCGAMGSetType(), PCGAMGAGG, PCGAMGGEO, PCGAMGCLASSICAL, PCGAMGSetProcEqLim(),
PCGAMGSetCoarseEqLim(), PCGAMGSetRepartition(), PCGAMGRegister(), PCGAMGSetReuseInterpolation(), PCGAMGASMSetUseAggs(),
PCGAMGSetParallelCoarseGridSolve(), PCGAMGSetNlevels(), PCGAMGSetThreshold(), PCGAMGGetType(), PCGAMGSetUseSAEstEig()
Level#
intermediate
Location#
Examples#
src/ts/tutorials/ex30.c
src/ksp/ksp/tutorials/ex4.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages