PCGAMGSetThreshold#
Relative threshold to use for dropping edges in aggregation graph
Synopsis#
#include "petscpc.h"
#include "petscksp.h"
PetscErrorCode PCGAMGSetThreshold(PC pc, PetscReal v[], PetscInt n)
Not Collective
Input Parameters#
pc - the preconditioner context
v - array of threshold values for finest
nlevels; 0.0 means keep all nonzero entries in the graph; negative means keep even zero entries in the graphn - number of threshold values provided in array
Options Database Key#
-pc_gamg_threshold l0,l1,… - the thresholds to drop edges
Notes#
Before coarsening or aggregating the graph, PCGAMG removes small values from the graph with this threshold, reducing the coupling
in the graph and yielding a different (perhaps better) coarser set of points.
Increasing the threshold decreases the rate of coarsening. Conversely reducing the threshold increases the rate of coarsening (aggressive coarsening) and thereby reduces the complexity of the coarse grids, and generally results in slower solver convergence rates.
If n is less than the total number of coarsenings (see PCGAMGSetNlevels()), then threshold scaling (see PCGAMGSetThresholdScale()) is used for each successive coarsening.
In this case, PCGAMGSetThresholdScale() must be called before PCGAMGSetThreshold().
If n is greater than the total number of levels, the excess entries in threshold are ignored.
See Also#
the Users Manual section on PCGAMG, the Users Manual section on PCMG, KSP: Linear System Solvers, PCGAMG, PCGAMGSetAggressiveLevels(), PCGAMGMISkSetAggressive(),
PCGAMGMISkSetMinDegreeOrdering(), PCGAMGSetThresholdScale()
Level#
intermediate
Location#
Implementations#
PCGAMGSetThreshold_GAMG() in src/ksp/pc/impls/gamg/gamg.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages