# DMHasNamedGlobalVector
check for a named, persistent global vector 
## Synopsis
```
#include "petscdm.h" 
PetscErrorCode DMHasNamedGlobalVector(DM dm, const char *name, PetscBool *exists)
```
Not Collective


## Input Parameters

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



## Output Parameter

- ***exists -*** true if the vector was previously created




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


## See Also
 `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`

## Level
developer

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


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