# PetscSFCreateFromLayouts
Creates a parallel star forest mapping two `PetscLayout` objects 
## Synopsis
```
#include "petscsf.h"   
PetscErrorCode PetscSFCreateFromLayouts(PetscLayout rmap, PetscLayout lmap, PetscSF *sf)
```
Collective


## Input Parameters

- ***rmap -*** `PetscLayout` defining the global root space
- ***lmap -*** `PetscLayout` defining the global leaf space



## Output Parameter

- ***sf -*** The parallel star forest





## See Also
 `PetscSF`, `PetscSFCreate()`, `PetscLayoutCreate()`, `PetscSFSetGraphLayout()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/utils/sfutils.c.html#PetscSFCreateFromLayouts">src/vec/is/sf/utils/sfutils.c</A>


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


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