aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Carpet/CarpetMask/src/mask_surface.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Carpet/CarpetMask/src/mask_surface.cc b/Carpet/CarpetMask/src/mask_surface.cc
index 990189a9f..a78a9f9f1 100644
--- a/Carpet/CarpetMask/src/mask_surface.cc
+++ b/Carpet/CarpetMask/src/mask_surface.cc
@@ -97,12 +97,14 @@ namespace CarpetMask {
weight[ind] = 0.0;
} else {
CCTK_REAL const theta =
- acos (min (+1.0, max (-1.0, dz / rho)));
+ acos (min (CCTK_REAL (+1.0),
+ max (CCTK_REAL (-1.0), dz / rho)));
assert (not isnan (theta));
assert (theta >= 0);
assert (theta <= M_PI);
CCTK_REAL const phi =
- fmod (atan2 (dy, dx) + 2 * M_PI, 2 * M_PI);
+ fmod (atan2 (dy, dx) + CCTK_REAL (2 * M_PI),
+ CCTK_REAL (2 * M_PI));
assert (not isnan (phi));
assert (phi >= 0);
assert (phi < 2 * M_PI);