PETSC_STATIC_ARRAY_LENGTH#

Return the length of a static array

Synopsis#

#include <petscmacros.h>
size_t PETSC_STATIC_ARRAY_LENGTH(a)

Input Parameter#

  • a - a static array of any type

Output Parameter#

  • <return- value> - the length of the array

Example#

  PetscInt a[22];
  size_t sa = PETSC_STATIC_ARRAY_LENGTH(a)

sa will have a value of 22

Level#

intermediate

Location#

include/petscmacros.h

Examples#

src/ksp/ksp/tutorials/ex56.c
src/snes/tutorials/ex62.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex11_sa.c
src/ts/tutorials/ex18.c
src/ts/tutorials/extchemfield.c


Edit on GitLab

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