:orphan:
# PCGAMGSetCoarseGridLayoutType
place coarse grids on processors with natural order (compact type)
## Synopsis
```
#include "petscpc.h"
#include "petscksp.h"
PetscErrorCode PCGAMGSetCoarseGridLayoutType(PC pc, PCGAMGLayoutType flg)
```
Collective
## Input Parameters
- ***pc -*** the preconditioner context
- ***flg -*** `PCGAMGLayoutType` type, either `PCGAMG_LAYOUT_COMPACT` or `PCGAMG_LAYOUT_SPREAD`
## Options Database Key
- ***-pc_gamg_coarse_grid_layout_type -*** place the coarse grids with natural ordering
## See Also
`PCGAMG`, `PCGAMGSetUseParallelCoarseGridSolve()`, `PCGAMGSetCpuPinCoarseGrids()`, `PCGAMGLayoutType`, `PCGAMG_LAYOUT_COMPACT`, `PCGAMG_LAYOUT_SPREAD`
## Level
intermediate
## Location
src/ksp/pc/impls/gamg/gamg.c
## Implementations
PCGAMGSetCoarseGridLayoutType_GAMG in src/ksp/pc/impls/gamg/gamg.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)