From 0f4e25f4c7d7d947b106a740ed06dfb8c7c46798 Mon Sep 17 00:00:00 2001 From: eschnett Date: Fri, 8 Mar 2013 20:32:54 +0000 Subject: Replace Cactus complex number type with C/C++ complex numbers Map CCTK_COMPLEX to "double complex" in C, and "complex" in C++. (It is already mapped to "double complex" in Fortran.) Update type definitions. Re-implement Cactus complex number math functions by calling the respective C functions. Update thorn that access real and imaginary parts of complex numbers to use standard-conforming methods instead. git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@229 83718e91-0e4f-0410-abf4-91180603181f --- src/announce.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/announce.cc b/src/announce.cc index bf26933..8a46c68 100644 --- a/src/announce.cc +++ b/src/announce.cc @@ -766,14 +766,14 @@ namespace Formaline keyrebuf << key << ".Re"; string const keyrestr = keyrebuf.str(); char const * const keyre = keyrestr.c_str(); - stores.store (keyre, val.Re); + stores.store (keyre, CCTK_CmplxReal(val)); } { ostringstream keyimbuf; keyimbuf << key << ".Im"; string const keyimstr = keyimbuf.str(); char const * const keyim = keyimstr.c_str(); - stores.store (keyim, val.Im); + stores.store (keyim, CCTK_CmplxImag(val)); } } break; -- cgit v1.2.3