petsc-3.12.4 2020-02-04
Report Typos and Errors

# PetscArrayzero

Zeros an array in memory.

### Synopsis

    #include <petscsys.h>
    PetscErrorCode PetscArrayzero(anytype *str1,size_t cnt)

Not Collective

### Input Parameters

| str1 | - array
| cnt | - Count of the array, not in bytes, but number of entries in the array

### Note

This routine is a preferred replacement to PetscMemzero()

### See Also

PetscMemcpy(), PetscMemcmp(), PetscMemzero(), PetscArraycmp(), PetscArraycpy(), PetscMemmove(), PetscStrallocpy(), PetscArraymove()

### Level

intermediate

### Location

include/petscsys.h

### Examples

src/ksp/ksp/examples/tutorials/ex28.c.html
src/ts/examples/tutorials/ex9.c.html
src/ts/examples/tutorials/ex14.c.html
src/tao/leastsquares/examples/tutorials/chwirut2.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages