petsc-3.4.5 2014-06-29

PetscComplex

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

Synopsis

#define PETSC_DESIRE_COMPLEX
#include 
PetscComplex number = 1. + 2.*PETSC_i;

Note

Complex numbers are automatically available if PETSc was configured --with-scalar-type=complex (in which case PetscComplex will match PetscScalar), otherwise the macro PETSC_DESIRE_COMPLEX must be defined before including any PETSc headers. If the compiler supports complex numbers, PetscComplex and associated variables and functions will be defined and PETSC_HAVE_COMPLEX will be set.

See Also

PetscReal, PetscComplex, MPIU_COMPLEX, PetscInt, 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