Vecs — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# Vecs

Collection of `Vec`s where the storage for the vectors is held in a single contiguous block of memory

## Synopsis

    typedef struct _n_Vecs     *Vecs;

## Notes

Temporary construct for handling multiple right-hand side solves.

This is faked by storing a single `Vec` whose array is sized to hold `n` vectors back to back.

## See Also

`Vec`, `VecsCreateSeq()`, `VecsCreateSeqWithArray()`, `VecsDuplicate()`, `VecsDestroy()`

## Level

advanced

## Location

include/petscvec.h

## Examples

src/ksp/ksp/tutorials/bench_kspsolve.c
src/tao/tutorials/ex3.c
src/dm/impls/stag/tutorials/ex6.c
src/dm/impls/stag/tutorials/ex4.c

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