:orphan:
# PetscLayoutSetUp
given a map where you have set either the global or local size sets up the map so that it may be used. 
## Synopsis
```
#include "petscis.h" 
PetscErrorCode PetscLayoutSetUp(PetscLayout map)
```
Collective


## Input Parameter

- ***map -*** pointer to the map





## Notes
Typical calling sequence
```none
  PetscLayoutCreate(MPI_Comm,PetscLayout *);
  PetscLayoutSetBlockSize(PetscLayout,1);
  PetscLayoutSetSize(PetscLayout,n) or PetscLayoutSetLocalSize(PetscLayout,N); or both
  PetscLayoutSetUp(PetscLayout);
  PetscLayoutGetSize(PetscLayout,PetscInt *);
```


If range exists, and local size is not set, everything gets computed from the range.

If the local size, global size are already set and range exists then this does nothing.


## See Also
 [PetscLayout](sec_matlayout), `PetscLayoutSetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetLocalSize()`,
`PetscLayout`, `PetscLayoutDestroy()`,
`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutCreate()`, `PetscSplitOwnership()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/utils/pmap.c.html#PetscLayoutSetUp">src/vec/is/utils/pmap.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/utils/pmap.c)


[Index of all IS routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
