PCMGGetGridComplexity — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# 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

KSP: Linear System Solvers, `PCMG`, `PCMGGetLevels()`, `PCMGSetLevels()`

## Level

advanced

## Location

src/ksp/pc/impls/mg/mg.c

Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages