# DMForestSetWeightCapacity
During the pre-setup phase, set the capacity of the current process when repartitioning a pre-adaptation forest (see DMForestGetAdaptivityForest()).  After partitioning, the ratio of the weight of each process's cells to the process's capacity will be roughly equal for all processes.  A capacity of 0 indicates that the current process should not have any cells after repartitioning. 
## Synopsis
```
#include "petscdmforest.h" 
#include "petscdm.h" 
#include "petscdmlabel.h" 
PetscErrorCode DMForestSetWeightCapacity(DM dm, PetscReal capacity)
```
Logically Collective on dm


## Input parameters

- ***dm -*** the forest
- ***capacity -*** this process's capacity





## See Also
`DMForestGetWeightCapacity()`, `DMForestSetCellWeights()`, `DMForestSetCellWeightFactor()`

## Level
advanced

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