aboutsummaryrefslogtreecommitdiff
path: root/src/ReductionNorm2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ReductionNorm2.c')
-rw-r--r--src/ReductionNorm2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ReductionNorm2.c b/src/ReductionNorm2.c
index a93e279..5eb9c3b 100644
--- a/src/ReductionNorm2.c
+++ b/src/ReductionNorm2.c
@@ -315,8 +315,8 @@ static int ReductionNorm2 (const cGH *GH,
case CCTK_VARIABLE_COMPLEX:
#undef REDUCTION_OPERATION
-#define REDUCTION_OPERATION(norm2, scalar) norm2 += SQR ((scalar).Re) + \
- SQR ((scalar).Im)
+#define REDUCTION_OPERATION(norm2, scalar) \
+ norm2 += SQR (CCTK_CmplxReal(scalar)) + SQR (CCTK_CmplxImag(scalar))
ITERATE_ARRAY (CCTK_COMPLEX, num_dims, inarrays[i],
from, to, iterator, points_per_dim,
CCTK_REAL, outvals, num_outvals, total_outvals);