aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreschnett <eschnett@6a38eb6e-646e-4a02-a296-d141613ad6c4>2013-03-08 20:30:27 +0000
committereschnett <eschnett@6a38eb6e-646e-4a02-a296-d141613ad6c4>2013-03-08 20:30:27 +0000
commitc6844f3f2026a0bc60046322b8849e4523b2e816 (patch)
tree4198ddc08834001a60f65de7d7505be3814d3c13 /src
parent049f6d5c2f70977702964b929c971befe25a32e2 (diff)
Replace Cactus complex number type with C/C++ complex numbers
Map CCTK_COMPLEX to "double complex" in C, and "complex<double>" 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
Diffstat (limited to 'src')
-rw-r--r--src/ScalarBoundary.c9
1 files changed, 1 insertions, 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: