PetscDataType#

Used for handling different basic data types.

Synopsis#

Notes#

Use of this should be avoided if one can directly use MPI_Datatype instead.

PETSC_INT is the datatype for a PetscInt, regardless of whether it is 4 or 8 bytes. PETSC_REAL, PETSC_COMPLEX and PETSC_SCALAR are the datatypes for PetscReal, PetscComplex and PetscScalar, regardless of their sizes.

Developer Notes#

It would be nice if we could always just use MPI Datatypes, why can we not?

If you change any values in PetscDatatype make sure you update their usage in share/petsc/matlab/PetscBagRead.m and share/petsc/matlab/@PetscOpenSocket/read/write.m

TODO#

Remove use of improper PETSC_ENUM

See Also#

PetscBinaryRead(), PetscBinaryWrite(), PetscDataTypeToMPIDataType(), PetscDataTypeGetSize()

Level#

beginner

Location#

include/petscsystypes.h

Examples#

src/sys/tutorials/ex7.c
src/sys/tutorials/ex6.c
src/vec/vec/tutorials/ex21.c
src/ts/tutorials/ex11.c
src/ksp/ksp/tutorials/ex55.c
src/ksp/ksp/tutorials/ex54.c
src/ksp/ksp/tutorials/ex56.c
src/dm/tutorials/ex15.c

Examples#

src/sys/tutorials/ex5.c
src/dm/field/tutorials/ex1.c
src/dm/impls/swarm/tutorials/ex1.c

Examples#

src/dm/tutorials/ex20.c

Examples#

src/sys/tutorials/ex5.c
src/vec/vec/tutorials/ex21.c
src/vec/vec/tutorials/ex7.c
src/vec/vec/tutorials/ex43.c
src/vec/vec/tutorials/ex6.c
src/snes/tutorials/ex63.c
src/dm/tutorials/swarm_ex3.c


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