# PetscProcessTree
Prepares tree data to be displayed graphically 
## Synopsis
```
#include "petscsys.h"  
PetscErrorCode PetscProcessTree(PetscInt n, const PetscBool mask[], const PetscInt parentid[], PetscInt *Nlevels, PetscInt **Level, PetscInt **Levelcnt, PetscInt **Idbylevel, PetscInt **Column)
```
Not Collective


## Input Parameters

- ***n  -*** number of values
- ***mask -*** indicates those entries in the tree, location 0 is always masked
- ***parentid -*** indicates the parent of each entry



## Output Parameters

- ***Nlevels -*** the number of levels
- ***Level -*** for each node tells its level
- ***Levelcnts -*** the number of nodes on each level
- ***Idbylevel -*** a list of ids on each of the levels, first level followed by second etc
- ***Column -*** for each id tells its column index





## Note
This code is not currently used


## See Also
 `PetscSortReal()`, `PetscSortIntWithPermutation()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/sorti.c.html#PetscProcessTree">src/sys/utils/sorti.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/utils/sorti.c)


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