VecDuplicate

Creates a new vector of the same type as an existing vector.

Synopsis

int VecDuplicate(Vec v,Vec *newv) 
Collective on Vec

Input Parameters

v -a vector to mimic

Output Parameter

newv -location to put new vector

Notes

VecDuplicate() does not copy the vector, but rather allocates storagefor the new vector. Use VecCopy() to copy a vector.

Use VecDestroy() to free the space. Use VecDuplicateVecs() to get severalvectors.

Keywords

vector, duplicate, create

See Also

VecDestroy(), VecDuplicateVecs(), VecCreate(), VecCopy()

Examples

src/vec/examples/tutorials/ex4f.F
src/vec/examples/tutorials/ex1f.F
src/vec/examples/tutorials/ex4f90.F
src/vec/examples/tutorials/ex1f90.F
src/vec/examples/tutorials/ex1.c
src/adic/examples/tutorials/ex1.c
src/adic/examples/tutorials/ex2.c
src/adic/examples/tutorials/ex3.c
src/adic/examples/tutorials/ex4.c
src/adic/examples/tutorials/ex5.c

Location: src/vec/interface/vector.c
Vector Index
Table of Contents