VecsDuplicate — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# VecsDuplicate

Creates a new `Vecs` with the same size and layout as an existing `Vecs`, but does not copy the values

## Synopsis

    PetscErrorCode VecsDuplicate(Vecs x, Vecs *y)

Collective

## Input Parameter

- x - the existing `Vecs`

## Output Parameter

- y - the newly created `Vecs`

## See Also

`Vecs`, `VecsCreateSeq()`, `VecsCreateSeqWithArray()`, `VecsDestroy()`, `VecDuplicate()`

## Level

advanced

## Location

src/vec/vec/utils/vecs.c

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages