:orphan:
# DMGetNamedGlobalVector
get access to a named, persistent global vector 
## Synopsis
```
#include "petscdm.h" 
PetscErrorCode DMGetNamedGlobalVector(DM dm, const char *name, Vec *X)
```
Collective


## Input Parameters

- ***dm -*** `DM` to hold named vectors
- ***name -*** unique name for `Vec`



## Output Parameter

- ***X -*** named `Vec`





## Note
If a `Vec` with the given name does not exist, it is created.


## See Also
 `DM`, `DMRestoreNamedGlobalVector()`

## Level
developer

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex29.c.html">src/ts/tutorials/ex29.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dmget.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)  
