PetscCalloc1#

Allocates a cleared (zeroed) array of memory aligned to PETSC_MEMALIGN

Synopsis#

#include <petscsys.h>
PetscErrorCode PetscCalloc1(size_t m1,type **r1)

Not Collective

Input Parameter#

  • m1 - number of elements to allocate in 1st chunk (may be zero)

Output Parameter#

  • r1 - memory allocated

Notes#

See PetsMalloc1() for more details on usage.

See Also#

PetscFree(), PetscNew(), PetscMalloc(), PetscMalloc1(), PetscCalloc2()

Level#

beginner

Location#

include/petscsys.h

Examples#

src/dm/impls/plex/tutorials/ex6.c
src/ksp/ksp/tutorials/ex59.c
src/ksp/ksp/tutorials/ex73.c
src/ksp/ksp/tutorials/ex82.c
src/snes/tutorials/ex31.c
src/snes/tutorials/ex36.c
src/tao/tutorials/ex3.c
src/ts/tutorials/ex18.c


Edit on GitLab

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