petsc-3.8.4 2018-03-24
Report Typos and Errors

PetscComplex

PETSc type that represents a complex number with precision matching that of PetscReal.

Synopsis

#include <petscsys.h>
PetscComplex number = 1. + 2.*PETSC_i;

Notes

For MPI calls that require datatypes, use MPIU_COMPLEX as the datatype for PetscComplex and MPIU_SUM etc for operations. They will automatically work correctly regardless of the size of PetscComplex.

See PetscScalar for details on how to ./configure the size of PetscReal

Complex numbers are automatically available if PETSc was able to find a working complex implementation

See Also

PetscReal, PetscScalar, PetscComplex, PetscInt, MPIU_REAL, MPIU_SCALAR, MPIU_COMPLEX, MPIU_INT, PETSC_i

Level:beginner
Location:
include/petscsys.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages