:orphan: # PCMGGetGridComplexity compute operator and grid complexity of the `PCMG` hierarchy ## Synopsis ``` #include "petscksp.h" PetscErrorCode PCMGGetGridComplexity(PC pc, PetscReal *gc, PetscReal *oc) ``` ## Input Parameter - ***pc -*** the preconditioner context ## Output Parameters - ***gc -*** grid complexity = sum_i(n_i) / n_0 - ***oc -*** operator complexity = sum_i(nnz_i) / nnz_0 ## Note This is often call the operator complexity in multigrid literature ## See Also `PCMG`, `PCMGGetLevels()`, `PCMGSetLevels()` ## Level advanced ## Location src/ksp/pc/impls/mg/mg.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/mg/mg.c) [Index of all PC routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)