:orphan:
# MatShellSetVecType
Sets the `VecType` of `Vec` returned by `MatCreateVecs()` 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatShellSetVecType(Mat mat, VecType vtype)
```
Logically Collective


## Input Parameters

- ***mat   -*** the `MATSHELL` shell matrix
- ***vtype -*** type to use for creating vectors





## See Also
 [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateVecs()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/shell/shell.c.html#MatShellSetVecType">src/mat/impls/shell/shell.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/shell/shell.c.html#MatShellSetVecType_Shell">MatShellSetVecType_Shell in src/mat/impls/shell/shell.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/shell/shell.c)


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