petsc-3.7.1 2016-05-15
Report Typos and Errors

VecSetType

Builds a vector, for a particular vector implementation.

Synopsis

#include "petscvec.h"  
PetscErrorCode  VecSetType(Vec vec, VecType method)
Collective on Vec Many br

Input Parameters

vec - The vector object Many br
method - The name of the vector type Many br

Options Database Key

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

Notes

See "petsc/include/petscvec.h" for available vector types (for instance, VECSEQ, VECMPI, or VECSHARED). Many br

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

Many br

Keywords

vector, set, type

See Also

VecGetType(), VecCreate()

Level:intermediate
Location:
src/vec/vec/interface/vecreg.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/vec/vec/examples/tutorials/ex9.c.html
src/vec/vec/examples/tutorials/ex10.c.html
src/ksp/ksp/examples/tutorials/ex31.c.html
src/snes/examples/tutorials/ex70.c.html
src/tao/constrained/examples/tutorials/maros.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html