DMSetCoarsenLevel — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# DMSetCoarsenLevel

Sets the number of coarsenings that have generated this `DM`.

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMSetCoarsenLevel(DM dm, PetscInt level)

Collective

## Input Parameters

- dm - the `DM` object

- level - number of coarsenings

## Note

This is rarely used directly, the information is automatically set when a `DM` is created with `DMCoarsen()`

## See Also

DM Basics, `DM`, `DMCoarsen()`, `DMGetCoarsenLevel()`, `DMGetRefineLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`

## Level

developer

## Location

src/dm/interface/dm.c

## Examples

src/ts/tutorials/ex30.c

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