diff options
Diffstat (limited to 'src/Compute_Norm.c')
-rw-r--r-- | src/Compute_Norm.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/src/Compute_Norm.c b/src/Compute_Norm.c index 23f5b68..2fd7752 100644 --- a/src/Compute_Norm.c +++ b/src/Compute_Norm.c @@ -1,12 +1,5 @@ - - - -/* XXX cleanup the include files ! */ - -#include <assert.h> +#include <math.h> #include <stdio.h> -#include <stdlib.h> -#include <string.h> #include "cctk.h" #include "cctk_Arguments.h" @@ -47,23 +40,13 @@ void Norms_Compute_Norms (CCTK_ARGUMENTS) dy = CCTK_DELTA_SPACE(1); dz = CCTK_DELTA_SPACE(2); - /* XXX ghost size */ - istart = 1; - jstart = 1; - kstart = 1; + istart = cctk_nghostzones[0]; + jstart = cctk_nghostzones[1]; + kstart = cctk_nghostzones[2]; - iend = cctk_lsh[0]-1; - jend = cctk_lsh[1]-1; - kend = cctk_lsh[2]-1; - - for (k=kstart;k<kend;k++) { - for (j=jstart;j<jend;j++) { - for (i=istart;i<iend;i++) { - index=CCTK_GFINDEX3D(cctkGH,i,j,k); - diff_term[index]=0.; - } - } - } + iend = cctk_lsh[0]-cctk_nghostzones[0]; + jend = cctk_lsh[1]-cctk_nghostzones[1]; + kend = cctk_lsh[2]-cctk_nghostzones[2]; target_proc = 0; reduction_handle = CCTK_ReductionArrayHandle("norm2"); |