:orphan:
# DMPlexCreateSection
Create a `PetscSection` based upon the dof layout specification provided.
## Synopsis
```
#include "petscdmplex.h"
PetscErrorCode DMPlexCreateSection(DM dm, DMLabel label[], const PetscInt numComp[], const PetscInt numDof[], PetscInt numBC, const PetscInt bcField[], const IS bcComps[], const IS bcPoints[], IS perm, PetscSection *section)
```
Not Collective
## Input Parameters
- ***dm -*** The `DMPLEX` object
- ***label -*** The label indicating the mesh support of each field, or NULL for the whole mesh
- ***numComp -*** An array of size numFields that holds the number of components for each field
- ***numDof -*** An array of size numFields*(dim+1) which holds the number of dof for each field on a mesh piece of dimension d
- ***numBC -*** The number of boundary conditions
- ***bcField -*** An array of size numBC giving the field number for each boundary condition
- ***bcComps -*** [Optional] An array of size numBC giving an `IS` holding the field components to which each boundary condition applies
- ***bcPoints -*** An array of size numBC giving an `IS` holding the `DMPLEX` points to which each boundary condition applies
- ***perm -*** Optional permutation of the chart, or NULL
## Output Parameter
- ***section -*** The `PetscSection` object
## Notes
numDof[f*(dim+1)+d] gives the number of dof for field f on points of dimension d. For instance, numDof[1] is the
number of dof for field 0 on each edge.
The chart permutation is the same one set using `PetscSectionSetPermutation()`
## Developer Note
This is used by `DMCreateLocalSection()`?
## See Also
[](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `PetscSectionCreate()`, `PetscSectionSetPermutation()`
## Level
developer
## Location
src/dm/impls/plex/plexsection.c
## Examples
src/dm/impls/plex/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex14.c
src/dm/impls/plex/tutorials/ex1f90.F90
src/dm/impls/plex/tutorials/ex6.c
src/dm/tutorials/ex20.c
src/dm/tutorials/ex21.c
src/ts/tutorials/ex52.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexsection.c)
[Index of all DMPlex routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)