VecDuplicateVecs
Creates several vectors of the same type as an existing vector.
Synopsis
#include "vec.h"
int VecDuplicateVecs(Vec v,int m,Vec *V[])
Collective on Vec
Input Parameters
| m | - the number of vectors to obtain
|
| v | - a vector to mimic
|
Output Parameter
V -location to put pointer to array of vectors
Notes
Use VecDestroyVecs() to free the space. Use VecDuplicate() to form a single
vector.
Fortran Note
The Fortran interface is slightly different from that given below, it
requires one to pass in V a Vec (integer) array of size at least m.
See the Fortran chapter of the users manual and petsc/src/vec/examples for details.
Keywords
vector, duplicate
See Also
VecDestroyVecs(), VecDuplicate(), VecCreate(), VecDuplicateVecsF90()
Examples
src/vec/examples/tutorials/ex1f.F
src/vec/examples/tutorials/ex1.c
src/vec/examples/tutorials/ex10.c
src/vec/examples/tutorials/ex1e.c
Level:intermediate
Location:src/vec/interface/vector.c
Vector Index
Table of Contents