Skip to main content
Ctrl+K
PETSc 3.23.2 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
  • VecZeroEntries

VecZeroEntries#

puts a 0.0 in each element of a vector

Synopsis#

#include "petscvec.h"   
PetscErrorCode VecZeroEntries(Vec vec)

Logically Collective

Input Parameter#

  • vec - The vector

Note#

If the norm of the vector is known to be zero then this skips the unneeded zeroing process

See Also#

Vectors and Parallel Data, Vec, VecCreate(), VecSetOptionsPrefix(), VecSet(), VecSetValues()

Level#

beginner

Location#

src/vec/vec/interface/vector.c

Examples#

src/snes/tutorials/ex28.c
src/snes/tutorials/ex73f90t.F90
src/ksp/ksp/tutorials/ex69.c
src/ksp/ksp/tutorials/ex49.c
src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/ex42.c
src/snes/tutorials/ex56.c
src/ksp/ksp/tutorials/ex70.c
src/ksp/ksp/tutorials/ex43.c
src/ksp/ksp/tutorials/ex56.c


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

On this page
  • Synopsis
  • Input Parameter
  • Note
  • 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-05-21T08:38:54-0500 (v3.23.2-41-gb677dd453eaf).