# DMCopyAuxiliaryVec
Copy the auxiliary vector data on a `DM` to a new `DM` 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCopyAuxiliaryVec(DM dm, DM dmNew)
```
Not collective


## Input Parameter

- ***dm    -*** The `DM`



## Output Parameter

- ***dmNew -*** The new `DM`, now with the same auxiliary data





## Note
This is a shallow copy of the auxiliary vectors


## See Also
 `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMSetAuxiliaryVec()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMCopyAuxiliaryVec">src/dm/interface/dm.c</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
