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

VecDuplicateVecs

Creates several vectors of the same type as an existing vector.

Synopsis

#include "petscvec.h"   
PetscErrorCode  VecDuplicateVecs(Vec v,PetscInt m,Vec *V[])
Collective on Vec Many br

Input Parameters

m - the number of vectors to obtain Many br
v - a vector to mimic Many br

Output Parameter

V -location to put pointer to array of vectors Many br

Notes

Use VecDestroyVecs() to free the space. Use VecDuplicate() to form a single Many brvector. Many br

Fortran Note

The Fortran interface is slightly different from that given below, it Many brrequires one to pass in V a Vec (integer) array of size at least m. Many brSee the Fortran chapter of the users manual and petsc/src/vec/vec/examples for details. Many br

Many br

See Also

VecDestroyVecs(), VecDuplicate(), VecCreate(), VecDuplicateVecsF90()

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

Examples

src/vec/vec/examples/tutorials/ex1.c.html
src/vec/vec/examples/tutorials/ex1f.F.html
src/ksp/ksp/examples/tutorials/ex49.c.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html