# DMCreateSectionSF
Create the `PetscSF` encoding the parallel dof overlap for the `DM` based upon the `PetscSection`s describing the data layout. 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCreateSectionSF(DM dm, PetscSection localSection, PetscSection globalSection)
```

## Input Parameters

- ***dm -*** The `DM`
- ***localSection -*** `PetscSection` describing the local data layout
- ***globalSection -*** `PetscSection` describing the global data layout





## Note
One usually uses `DMGetSectionSF()` to obtain the `PetscSF`


## Developer Note
Since this routine has for arguments the two sections from the `DM` and puts the resulting `PetscSF`
directly into the `DM`, perhaps this function should not take the local and global sections as
input and should just obtain them from the `DM`?


## See Also
 `DMGetSectionSF()`, `DMSetSectionSF()`, `DMGetLocalSection()`, `DMGetGlobalSection()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMCreateSectionSF">src/dm/interface/dm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)


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