aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetMask
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2011-05-11 19:15:55 -0400
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 18:26:18 +0000
commit439ca66d81a8550fdc65ebc6042fe090476e8219 (patch)
treebe9c9f2090b39e81721044c3416067efd31f8bd5 /Carpet/CarpetMask
parent630af6b9bd00fa2e9cb613a60dc5d53805504ec7 (diff)
CarpetMask: Set CarpetReduce::iweight instead of CarpetReduce::weight
Diffstat (limited to 'Carpet/CarpetMask')
-rw-r--r--Carpet/CarpetMask/src/mask_excluded.cc12
-rw-r--r--Carpet/CarpetMask/src/mask_surface.cc14
2 files changed, 13 insertions, 13 deletions
diff --git a/Carpet/CarpetMask/src/mask_excluded.cc b/Carpet/CarpetMask/src/mask_excluded.cc
index 6016c26b5..1b1c0beb5 100644
--- a/Carpet/CarpetMask/src/mask_excluded.cc
+++ b/Carpet/CarpetMask/src/mask_excluded.cc
@@ -26,13 +26,13 @@ namespace CarpetMask {
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
- CCTK_REAL * const weight =
- static_cast <CCTK_REAL *>
- (CCTK_VarDataPtr (cctkGH, 0, "CarpetReduce::weight"));
+ CCTK_INT * const iweight =
+ static_cast <CCTK_INT *>
+ (CCTK_VarDataPtr (cctkGH, 0, "CarpetReduce::iweight"));
- if (not weight) {
+ if (not iweight) {
CCTK_WARN (CCTK_WARN_ABORT,
- "CarpetReduce is not active, or CarpetReduce::mask does not have storage");
+ "CarpetReduce is not active, or CarpetReduce::iweight does not have storage");
}
for (int n = 0; n < 10; ++ n) {
@@ -60,7 +60,7 @@ namespace CarpetMask {
dx2 + dy2 + dz2 >= r2 :
dx2 + dy2 + dz2 <= r2)
{
- weight[ind] = 0.0;
+ iweight[ind] = 0;
}
} CCTK_ENDLOOP3_ALL(CarpetExcludedSetup);
diff --git a/Carpet/CarpetMask/src/mask_surface.cc b/Carpet/CarpetMask/src/mask_surface.cc
index 2964240e8..02d80f9f8 100644
--- a/Carpet/CarpetMask/src/mask_surface.cc
+++ b/Carpet/CarpetMask/src/mask_surface.cc
@@ -67,13 +67,13 @@ namespace CarpetMask {
last_output.resize (num_excluded, -1);
}
- CCTK_REAL * const weight =
- static_cast <CCTK_REAL *>
- (CCTK_VarDataPtr (cctkGH, 0, "CarpetReduce::weight"));
+ CCTK_INT * const iweight =
+ static_cast <CCTK_INT *>
+ (CCTK_VarDataPtr (cctkGH, 0, "CarpetReduce::iweight"));
- if (not weight) {
+ if (not iweight) {
CCTK_WARN (CCTK_WARN_ABORT,
- "CarpetReduce is not active, or CarpetReduce::mask does not have storage");
+ "CarpetReduce is not active, or CarpetReduce::iweight does not have storage");
}
for (int n = 0; n < num_excluded; ++ n) {
@@ -127,7 +127,7 @@ namespace CarpetMask {
sqrt (pow (dx, 2) + pow (dy, 2) + pow (dz, 2));
if (rho < 1.0e-12) {
// Always excise the surface origin
- weight[ind] = 0.0;
+ iweight[ind] = 0;
} else {
CCTK_REAL theta =
acos (min (CCTK_REAL (+1.0),
@@ -171,7 +171,7 @@ namespace CarpetMask {
CCTK_REAL const dr =
sf_radius[a + maxntheta * (b + maxnphi * sn)];
if (rho <= dr * shrink_factor) {
- weight[ind] = 0.0;
+ iweight[ind] = 0;
}
}
} CCTK_ENDLOOP3_ALL(CarpetSurfaceSetup);