:orphan:
# DMCopyDisc
Copy the fields and discrete systems for the `DM` into another `DM`
## Synopsis
```
#include "petscdm.h"
#include "petscdmlabel.h"
#include "petscds.h"
PetscErrorCode DMCopyDisc(DM dm, DM newdm)
```
Collective
## Input Parameter
- ***dm -*** The `DM`
## Output Parameter
- ***newdm -*** The `DM`
## Developer Note
Really ugly name, nothing in PETSc is called a `Disc` plus it is an ugly abbreviation
## See Also
[](ch_dmbase), `DM`, `DMCopyFields()`, `DMCopyDS()`
## Level
advanced
## Location
src/dm/interface/dm.c
## Examples
src/snes/tutorials/ex12.c
src/snes/tutorials/ex13.c
src/snes/tutorials/ex17.c
src/snes/tutorials/ex20.c
src/snes/tutorials/ex23.c
src/snes/tutorials/ex24.c
src/snes/tutorials/ex26.c
src/snes/tutorials/ex36.c
src/snes/tutorials/ex62.c
src/snes/tutorials/ex69.c
src/snes/tutorials/ex71.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)
[Index of all DM routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)