diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-10-01 15:20:07 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:25:26 +0000 |
commit | 673d981e37b81792b1c6b304cc3078daebb6dbc4 (patch) | |
tree | 3d4fe90aa777c862095c4f3f0983ba3b822e1b92 /Carpet/CarpetReduce/src/mask_init.c | |
parent | f430b7f50ff5799cd2144e47738aadc399a9d760 (diff) |
CarpetReduce: Correct errors in calculating the weight function
Diffstat (limited to 'Carpet/CarpetReduce/src/mask_init.c')
-rw-r--r-- | Carpet/CarpetReduce/src/mask_init.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Carpet/CarpetReduce/src/mask_init.c b/Carpet/CarpetReduce/src/mask_init.c index 1ec321773..806a4b3d0 100644 --- a/Carpet/CarpetReduce/src/mask_init.c +++ b/Carpet/CarpetReduce/src/mask_init.c @@ -4,6 +4,8 @@ #include <loopcontrol.h> +#include "bits.h" + void @@ -14,9 +16,12 @@ MaskBase_InitMask (CCTK_ARGUMENTS) /* Initialise the weight to 1 everywhere */ if (verbose) { - CCTK_INFO ("Initialising weight to 1"); + int const reflevel = GetRefinementLevel(cctkGH); + CCTK_VInfo (CCTK_THORNSTRING, + "Initialising weight to 1 on level %d", reflevel); } + int const allbits = BMSK(BMSK(cctk_dim)) - 1; #pragma omp parallel LC_LOOP3(MaskBase_InitMask_interior, i,j,k, @@ -24,6 +29,6 @@ MaskBase_InitMask (CCTK_ARGUMENTS) cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { int const ind = CCTK_GFINDEX3D (cctkGH, i, j, k); - weight[ind] = 1.0; + iweight[ind] = allbits; } LC_ENDLOOP3(MaskBase_InitMask_interior); } |