aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gdata.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/gdata.cc')
-rw-r--r--Carpet/CarpetLib/src/gdata.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc
index c26d374a1..ecc8c4ba8 100644
--- a/Carpet/CarpetLib/src/gdata.cc
+++ b/Carpet/CarpetLib/src/gdata.cc
@@ -6,6 +6,7 @@
#include <vectors.h>
#include <cassert>
+#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
@@ -401,7 +402,7 @@ find_source_timelevel (vector <CCTK_REAL> const & times,
CCTK_REAL const min_time = * min_element (times.begin(), times.end());
CCTK_REAL const max_time = * max_element (times.begin(), times.end());
// TODO: Use a real delta-time from somewhere instead of 1.0
- CCTK_REAL const some_time = abs (min_time) + abs (max_time) + 1.0;
+ CCTK_REAL const some_time = fabs (min_time) + fabs (max_time) + 1.0;
if (op != op_copy) {
if (time < min_time - eps * some_time or
time > max_time + eps * some_time)
@@ -436,9 +437,7 @@ find_source_timelevel (vector <CCTK_REAL> const & times,
}
if (timelevel == -1) {
for (size_t tl=0; tl<times.size(); ++tl) {
- static_assert (abs(0.1) > 0,
- "Function CarpetLib::abs has wrong signature");
- if (abs (times.AT(tl) - time) < eps * some_time) {
+ if (fabs (times.AT(tl) - time) < eps * some_time) {
timelevel = tl;
break;
}