DMSetCoarseDM — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# DMSetCoarseDM

Set the coarse `DM` from which this `DM` was obtained by refinement

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMSetCoarseDM(DM dm, DM cdm)

## Input Parameters

- dm - The `DM` object

- cdm - The coarse `DM`

## Note

Normally this is set automatically by `DMRefine()`

## See Also

DM Basics, `DM`, `DMGetCoarseDM()`, `DMCoarsen()`, `DMSetRefine()`, `DMSetFineDM()`

## Level

intermediate

## Location

src/dm/interface/dm.c

## Examples

src/ts/tutorials/ex30.c
src/ksp/ksp/tutorials/ex73.c
src/snes/tutorials/ex11.c

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