# PCGAMGCreateGraph
Creates a graph that is used by the ``PCGAMGType`` in the coarsening process 
## Synopsis
```
#include "petscpc.h" 
#include "petscksp.h" 
PetscErrorCode PCGAMGCreateGraph(PC pc, Mat A, Mat *G)
```

## Input Parameters

- ***pc -*** the `PCGAMG`
- ***A -*** the matrix, for any level



## Output Parameter

- ***G -*** the graph




.seealso: `PCGAMGType`, `PCGAMG`, `PCGAMGSetType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/gamg.c.html#PCGAMGCreateGraph">src/ksp/pc/impls/gamg/gamg.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/agg.c.html#PCGAMGCreateGraph_AGG">PCGAMGCreateGraph_AGG in src/ksp/pc/impls/gamg/agg.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/classical.c.html#PCGAMGCreateGraph_Classical">PCGAMGCreateGraph_Classical in src/ksp/pc/impls/gamg/classical.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/geo.c.html#PCGAMGCreateGraph_GEO">PCGAMGCreateGraph_GEO in src/ksp/pc/impls/gamg/geo.c</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
