PetscBool#

Logical variable. Actually an enum in C and a logical in Fortran.

Synopsis#

typedef enum {
  PETSC_FALSE,
  PETSC_TRUE
} PetscBool;

Developer Note#

Why have PetscBool, why not use bool in C? The problem is that K and R C, C99 and C++ all have different mechanisms for boolean values. It is not easy to have a simple macro that that will work properly in all circumstances with all three mechanisms.

See Also#

PETSC_TRUE, PETSC_FALSE, PetscNot(), PetscBool3

Level#

beginner

Location#

include/petscsystypes.h

Examples#

src/dm/dt/dualspace/impls/lagrange/tutorials/ex1.c
src/dm/dt/dualspace/impls/lagrange/tutorials/ex2.c
src/dm/field/tutorials/ex1.c
src/dm/impls/forest/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex10.c
src/dm/impls/plex/tutorials/ex11.c
src/dm/impls/plex/tutorials/ex13.c
src/dm/impls/plex/tutorials/ex4f90.F90
src/dm/impls/plex/tutorials/ex5.c
src/dm/impls/plex/tutorials/ex8.c
src/dm/impls/plex/tutorials/ex9.c


Edit on GitLab

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