# DMStagDuplicateWithoutSetup
duplicate a `DMSTAG` object without setting it up 
## Synopsis
```
PetscErrorCode DMStagDuplicateWithoutSetup(DM dm, MPI_Comm comm, DM *newdm)
```
Collective


## Input Parameters

- ***dm -*** The original `DM` object
- ***comm -*** the MPI communicator for the new DM (`MPI_COMM_NULL` to use the same communicator as `dm`)



## Output Parameter

- ***newdm  -*** The new `DM` object





## Developer Notes
Copies over all of the state for a `DMSTAG` object, except that which is
populated during `DMSetUp()`.  This function is used within (all) other
functions that require an un-setup clone, which is common when duplicating,
coarsening, refining, or creating compatible `DM`s with different fields.  For
this reason it also accepts an MPI communicator as an argument (though note
that at the time of this writing, implementations of `DMCoarsen()` and `DMRefine()`
don't usually seem to respect their "comm" arguments). This function could be
pushed up to the general `DM` API (and perhaps given a different name).

This is an internal function but we provide a man page in case it's made public


## See Also
 [](chapter_stag), `DMSTAG`, `DM`, `DMClone()`, `DMStagCreateCompatibleDMStag()`, `DMCoarsen()`, `DMRefine()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stagintern.c.html#DMStagDuplicateWithoutSetup">src/dm/impls/stag/stagintern.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/stag/stagintern.c)


[Index of all DMStag routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
