:orphan:
# DMMoabCreateVector
Create a Vec from either an existing tag, or a specified tag size, and a range of entities 
## Synopsis
```
#include "petscdmmoab.h"   
PetscErrorCode DMMoabCreateVector(DM dm, moab::Tag tag, const moab::Range *range, PetscBool is_global_vec, PetscBool destroy_tag, Vec *vec)
```
Collective


## Input Parameters

- ***dm              -*** The DMMoab object being set
- ***tag             -*** If non-zero, block size will be taken from the tag size
- ***range           -*** If non-empty, Vec corresponds to these entities, otherwise to the entities set on the DMMoab
- ***is_global_vec   -*** If true, this is a local representation of the Vec (including ghosts in parallel), otherwise a truly parallel one
- ***destroy_tag     -*** If true, MOAB tag is destroyed with Vec, otherwise it is left on MOAB



## Output Parameter

- ***vec             -*** The created vector





## See Also
 `VecCreate()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/moab/dmmbvec.cxx.html#DMMoabCreateVector">src/dm/impls/moab/dmmbvec.cxx</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/moab/dmmbvec.cxx)


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