**petsc-master 2019-12-10**

# PCGAMGSetSquareGraph

Square the graph, ie. compute A'*A before aggregating it
### Synopsis

#include "petscpc.h"
PetscErrorCode PCGAMGSetSquareGraph(PC pc, PetscInt n)

Not Collective on PC

### Input Parameters

### Options Database Key

**-pc_gamg_square_graph <n,default = 1> ** -number of levels to square the graph on before aggregating it

### Notes

Squaring the graph increases the rate of coarsening (aggressive coarsening) and thereby reduces the complexity of the coarse grids, and generally results in slower solver converge rates. Reducing coarse grid complexity reduced the complexity of Galerkin coarse grid construction considerably.

### See Also

PCGAMGSetSymGraph(), PCGAMGSetThreshold()

### Level

intermediate

### Location

src/ksp/pc/impls/gamg/agg.c
### Implementations

PCGAMGSetSquareGraph_AGG in src/ksp/pc/impls/gamg/agg.c

Index of all PC routines

Table of Contents for all manual pages

Index of all manual pages