From fa53c27c1de5d1afd5bc9d904e8a1858b06bebc4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 25 Apr 2013 14:12:14 -0400 Subject: CarpetReduce: Offset reduction weights when periodic boundaries are used Offset reduction weights by 1/2 grid point when periodic boundaries are used with vertex centering. This means that all interior points have then weight 1, and all boundary points have then weight 0. --- Carpet/CarpetReduce/src/mask_coords.c | 38 ++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'Carpet/CarpetReduce') diff --git a/Carpet/CarpetReduce/src/mask_coords.c b/Carpet/CarpetReduce/src/mask_coords.c index 0a07bc854..afdc79410 100644 --- a/Carpet/CarpetReduce/src/mask_coords.c +++ b/Carpet/CarpetReduce/src/mask_coords.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -21,6 +22,7 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) CCTK_INT is_internal[2*cctk_dim]; CCTK_INT is_staggered[2*cctk_dim]; CCTK_INT shiftout[2*cctk_dim]; + CCTK_INT is_periodic[2*cctk_dim]; int bnd_points[2*cctk_dim]; /* points outside the domain */ int int_points[cctk_dim]; /* global interior points */ @@ -52,6 +54,28 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) + for (int d=0; d