Skip to main content
Ctrl+K
PETSc 3.23.6 documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • VecSetUp

VecSetUp#

Sets up the internal vector data structures for the later use.

Synopsis#

#include "petscvec.h"   
PetscErrorCode VecSetUp(Vec v)

Collective

Input Parameter#

  • v - the Vec context

Notes#

For basic use of the Vec classes the user need not explicitly call VecSetUp(), since these actions will happen automatically.

See Also#

Vectors and Parallel Data, Vec, VecCreate(), VecDestroy()

Level#

advanced

Location#

src/vec/vec/interface/vector.c

Examples#

src/ts/tutorials/ex40.c
src/vec/is/sf/tutorials/ex2.c
src/vec/vec/tutorials/ex44.c
src/mat/tutorials/ex19.c
src/vec/is/sf/tutorials/ex3.c
src/ts/tutorials/ex51.c
src/ksp/ksp/tutorials/ex56.c
src/vec/vec/utils/tagger/tutorials/ex1.c
src/ts/tutorials/ex41.c
src/tao/constrained/tutorials/ex1.c


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

On this page
  • Synopsis
  • Input Parameter
  • Notes
  • See Also
  • Level
  • Location
  • Examples
Edit on GitLab
Show Source

© Copyright 1991-2025, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2025-09-19T04:23:46-0500 (v3.23.6-38-g9372c96dc2869).