Skip to main content
Ctrl+K
PETSc v3.26.0-2-g3c5cfaeaff0b 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
  • VecSetOption

VecSetOption#

Sets an option for controlling a vector’s behavior with VecSetValues() and related routines

Synopsis#

#include "petscvec.h"   
PetscErrorCode VecSetOption(Vec x, VecOption op, PetscBool flag)

Collective

Input Parameters#

  • x - the vector

  • op - the VecOption

  • flag - turn the option on or off

See Also#

Vectors and Parallel Data, Vec, VecSetValues(), VecOption, MatSetOption()

Level#

intermediate

Location#

src/vec/vec/interface/vector.c

Examples#

src/vec/vec/tests/ex15.c
src/vec/vec/tests/ex16.c
src/vec/vec/tests/ex29.c
src/vec/vec/tests/ex36.c
src/vec/vec/tests/ex49.c
src/vec/vec/tests/ex61.c
src/ksp/ksp/tutorials/ex71.c

Implementations#

VecSetOption_MPI() in src/vec/vec/impls/mpi/pbvec.c
VecSetOption_Seq() in src/vec/vec/impls/seq/bvec2.c


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

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

© Copyright 1991-2026, 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 2026-09-28T23:19:25-0500 (v3.26.0-2-g3c5cfaeaff0b).