diff options
author | schnetter <schnetter@d60812e6-3970-4df4-986e-c251b06effeb> | 2005-01-23 11:33:24 +0000 |
---|---|---|
committer | schnetter <schnetter@d60812e6-3970-4df4-986e-c251b06effeb> | 2005-01-23 11:33:24 +0000 |
commit | d01bd250a08175c54dfaf8d3b4d7ebb4a0ee7519 (patch) | |
tree | a7898c07e71f0071dc079e9fe9176ad7aa1dbb14 /src/ReductionNorm4.c | |
parent | ff13b6ad74100dd0adf82e9fc22a41c0279e9b00 (diff) |
Correct L3 and L4 norms for complex numbers.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@62 d60812e6-3970-4df4-986e-c251b06effeb
Diffstat (limited to 'src/ReductionNorm4.c')
-rw-r--r-- | src/ReductionNorm4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ReductionNorm4.c b/src/ReductionNorm4.c index 21eae29..2bf4a51 100644 --- a/src/ReductionNorm4.c +++ b/src/ReductionNorm4.c @@ -228,6 +228,7 @@ static int ReductionNorm4 (const cGH *GH, /* macros to complete the ITERATE_ARRAY macro */ #define INITIAL_REDUCTION_VALUE(array) 0 +#define POWER2(x) ((x) * (x)) #define POWER4(x) ((x) * (x) * (x) * (x)) @@ -312,8 +313,8 @@ static int ReductionNorm4 (const cGH *GH, case CCTK_VARIABLE_COMPLEX: #undef REDUCTION_OPERATION -#define REDUCTION_OPERATION(norm4, scalar) norm4 += POWER4 ((scalar).Re) + \ - POWER4 ((scalar).Im) +#define REDUCTION_OPERATION(norm4, scalar) \ + norm4 += POWER2 (POWER2 ((scalar).Re) + POWER2 ((scalar).Im)) ITERATE_ARRAY (CCTK_COMPLEX, num_dims, inarrays[i], from, to, iterator, points_per_dim, CCTK_REAL, outvals, num_outvals, total_outvals); |