Vecs — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# Vecs

Collection of vectors where the data for the vectors is stored in one contiguous memory

## Synopsis

    struct _n_Vecs {
      PetscInt n;
      Vec      v;
    };

## Notes

Temporary construct for handling multiply right-hand side solves

This is faked by storing a single vector that has enough array space for n vectors

## Level

advanced

## Location

include/petscvec.h

## Examples

src/tao/tutorials/ex3.c
src/dm/impls/stag/tutorials/ex6.c
src/ksp/ksp/tutorials/bench_kspsolve.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