VecSetType

Builds a vector, for a particular vector implementation.

Synopsis

int VecSetType(Vec vec,VecType type_name)
Collective on Vec

Input Parameters

vec - the vector object
type_name - name of the vector type

Options Database Key

-vec_type <type> -Sets the vector type; use -help for a list of available types

Notes

See "petsc/include/vec.h" for available vector types (for instance, VEC_SEQ, VEC_MPI, or VEC_SHARED).

Use VecDuplicate() or VecDuplicateVecs() to form additional vectors of the same type as an existing vector.

Keywords

vector, set, type

See Also

VecCreate()

Level:intermediate
Location:src/vec/utils/gcreatev.c
Vector Index
Table of Contents