VecSetStdBasis#
Set the vector to the i-th standard basis vector
Synopsis#
#include "petscvec.h"
PetscErrorCode VecSetStdBasis(Vec x, PetscInt i)
Logically Collective
Input Parameters#
x - the vector
i - the component to be set to one
Note#
This function sets x[i] = 1, and 0 otherwise.
See Also#
Level#
beginner
Location#
src/vec/vec/interface/rvector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages