# PetscSectionExtractDofsFromArray
Extracts elements of an array corresponding to DOFs of specified points. 
## Synopsis
```
#include "petscsection.h"   
PetscErrorCode PetscSectionExtractDofsFromArray(PetscSection origSection, MPI_Datatype dataType, const void *origArray, IS points, PetscSection *newSection, void *newArray[])
```
Not Collective


## Input Parameters

- ***origSection -*** the `PetscSection` describing the layout of the array
- ***dataType -*** `MPI_Datatype` describing the data type of the array (currently only `MPIU_INT`, `MPIU_SCALAR`, `MPIU_REAL`)
- ***origArray -*** the array; its size must be equal to the storage size of origSection
- ***points -*** `IS` with points to extract; its indices must lie in the chart of origSection



## Output Parameters

- ***newSection -*** the new `PetscSection` describing the layout of the new array (with points renumbered 0,1,... but preserving numbers of DOFs)
- ***newArray -*** the array of the extracted DOFs; its size is the storage size of newSection





## See Also
 [PetscSection](sec_petscsection), `PetscSectionSym`, `PetscSectionGetChart()`, `PetscSectionGetDof()`, `PetscSectionGetStorageSize()`, `PetscSectionCreate()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/section/interface/section.c.html#PetscSectionExtractDofsFromArray">src/vec/is/section/interface/section.c</A>


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


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