VecSetOption — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# 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/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