:orphan: # DMForestGetCellWeightFactor Get the factor by which the level of refinement changes the cell weight (see `DMForestSetCellWeights()`) when calculating partitions. The final weight of a cell will be (cellWeight) * (weightFactor^refinementLevel). A factor of 1 indicates that the weight of a cell does not depend on its level; a factor of 2, for example, might be appropriate for sub-cycling time-stepping methods, when the computation associated with a cell is multiplied by a factor of 2 for each additional level of refinement. ## Synopsis ``` #include "petscdmforest.h" #include "petscdm.h" #include "petscdmlabel.h" PetscErrorCode DMForestGetCellWeightFactor(DM dm, PetscReal *weightsFactor) ``` Not Collective ## Input Parameter - ***dm -*** the forest ## Output Parameter - ***weightsFactors -*** default 1. ## See Also `DM`, `DMFOREST`, `DMForestSetCellWeightFactor()`, `DMForestSetCellWeights()` ## Level advanced ## Location src/dm/impls/forest/forest.c --- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)