:orphan: # DMSetVecType Sets the type of vector created with `DMCreateLocalVector()` and `DMCreateGlobalVector()` ## Synopsis ``` #include "petscdm.h" #include "petscdmlabel.h" #include "petscds.h" PetscErrorCode DMSetVecType(DM da, VecType ctype) ``` Logically Collective ## Input Parameters - ***da -*** initial distributed array - ***ctype -*** the vector type, for example `VECSTANDARD`, `VECCUDA`, or `VECVIENNACL` ## Options Database Key - ***-dm_vec_type ctype -*** the type of vector to create ## See Also [](ch_dmbase), `DM`, `DMCreate()`, `DMDestroy()`, `DM`, `DMDAInterpolationType`, `VecType`, `DMGetVecType()`, `DMSetMatType()`, `DMGetMatType()`, `VECSTANDARD`, `VECCUDA`, `VECVIENNACL`, `DMCreateLocalVector()`, `DMCreateGlobalVector()` ## Level intermediate ## Location src/dm/interface/dm.c --- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)