# DMForestGetCellWeights
Get the weights assigned to each of the cells (see DMForestGetCellChart()) of the current process: weights are used to determine parallel partitioning.  Partitions will be created so that each process's ratio of weight to capacity (see DMForestSetWeightCapacity()) is roughly equal. If NULL, each cell receives a weight of 1. 
## Synopsis
```
#include "petscdmforest.h" 
#include "petscdm.h" 
#include "petscdmlabel.h" 
PetscErrorCode DMForestGetCellWeights(DM dm, PetscReal **weights)
```
Not collective


## Input Parameter

- ***dm -*** the forest



## Output Parameter

- ***weights -*** the array of weights for all cells, or NULL to indicate each cell has weight 1.





## See Also
 `DMForestSetCellWeights()`, `DMForestSetWeightCapacity()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/forest/forest.c.html#DMForestGetCellWeights">src/dm/impls/forest/forest.c</A>


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


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