# 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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/gamg.c.html#PCGAMGSetCoarseGridLayoutType">src/ksp/pc/impls/gamg/gamg.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/gamg.c.html#PCGAMGSetCoarseGridLayoutType_GAMG">PCGAMGSetCoarseGridLayoutType_GAMG in src/ksp/pc/impls/gamg/gamg.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)  
