# DMPlexGetTreeParent
get the parent of a point in the tree describing the point hierarchy (not the DAG) 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexGetTreeParent(DM dm, PetscInt point, PetscInt *parent, PetscInt *childID)
```

## Input Parameters

- ***dm -*** the `DMPLEX` object
- ***point -*** the query point



## Output Parameters

- ***parent -*** if not NULL, set to the parent of the point, or the point itself if the point does not have a parent
- ***childID -*** if not NULL, set to the child ID of the point with respect to its parent, or 0 if the point
does not have a parent





## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMPlexSetTree()`, `DMPlexGetTree()`, `DMPlexGetTreeChildren()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plextree.c.html#DMPlexGetTreeParent">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)  
