From c6844f3f2026a0bc60046322b8849e4523b2e816 Mon Sep 17 00:00:00 2001 From: eschnett Date: Fri, 8 Mar 2013 20:30:27 +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/CactusBase/Boundary/trunk@312 6a38eb6e-646e-4a02-a296-d141613ad6c4 --- src/ScalarBoundary.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c index eb84636..c943367 100644 --- a/src/ScalarBoundary.c +++ b/src/ScalarBoundary.c @@ -923,7 +923,7 @@ void CCTK_FCALL CCTK_FNAME (BndScalarVN) \ \ _index = INDEX_3D (lsh, ii, jj, kk); \ - ((left_cctk_type *) GH->data[var][timelvl])[_index] NUMBER_PART = \ + ((left_cctk_type *) GH->data[var][timelvl])[_index] = \ (right_cctk_type) scalar; \ } \ } \ @@ -1155,7 +1155,6 @@ static int ApplyBndScalar (const cGH *GH, { /* FIXME: can't pass an empty preprocessor constant as a macro argument on some systems (e.g. MacOS X), so we have to define it outside */ -#define NUMBER_PART case CCTK_VARIABLE_BYTE: SCALAR_BOUNDARY (CCTK_BYTE, CCTK_BYTE); break; @@ -1201,12 +1200,6 @@ static int ApplyBndScalar (const cGH *GH, #endif case CCTK_VARIABLE_COMPLEX: -#undef NUMBER_PART -#define NUMBER_PART .Re - SCALAR_BOUNDARY (CCTK_COMPLEX, CCTK_REAL); - scalar = 0.0; -#undef NUMBER_PART -#define NUMBER_PART .Im SCALAR_BOUNDARY (CCTK_COMPLEX, CCTK_REAL); break; default: -- cgit v1.2.3