next up previous contents
Next: Specifically for C Programmers Up: C Routines Previous: Example   Contents

Complex variables

Cactus supports complex grid variables, and since there is no complex data type in C, Cactus provides a number of functions for manipulating complex numbers to mirror the functionality available in Fortran. These functions are CCTK_Cmplx, CCTK_CmplxReal, CCTK_CmplxImag, CCTK_CmplxConjg, CCTK_CmplxAdd, CCTK_CmplxSub, CCTK_CmplxMul, CCTK_CmplxDiv, CCTK_CmplxExp, CCTK_CmplSin, CCTK_CmplxAbs, CCTK_CmplxLog, and CCTK_CmplSqrt. See the Reference Manual for more details.