# DMPlexGetTree
get the tree that describes the hierarchy of non-conforming mesh points. Collective on dm 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexGetTree(DM dm, PetscSection *parentSection, PetscInt *parents[], PetscInt *childIDs[], PetscSection *childSection, PetscInt *children[])
```

## Input Parameter

- ***dm -*** the `DMPLEX` object



## Output Parameters

- ***parentSection -*** a section describing the tree: a point has a parent if it has 1 dof in the section; the section
offset indexes the parent and childID list
- ***parents -*** a list of the point parents
- ***childIDs -*** identifies the relationship of the child point to the parent point; if there is a reference tree, then
the child corresponds to the point in the reference tree with index childID
- ***childSection -*** the inverse of the parent section
- ***children -*** a list of the point children





## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`,`DMPlexSetTree()`, `DMPlexSetReferenceTree()`, `DMPlexSetAnchors()`, `DMPlexGetTreeParent()`, `DMPlexGetTreeChildren()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plextree.c.html#DMPlexGetTree">src/dm/impls/plex/plextree.c</A>


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


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