aboutsummaryrefslogtreecommitdiff
path: root/Auxiliary
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-06 20:08:32 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-06 20:08:32 +0200
commitd05753ca05e145e154aef179d9f02b9e64612cc9 (patch)
treebd304264ae266d8df6a7af0a8226b1eec7981e27 /Auxiliary
parentb701a31d2064d3cebe9e2618849e1a872c8c4f78 (diff)
MathematicaCompat.h: Remove Fortran support
Diffstat (limited to 'Auxiliary')
-rw-r--r--Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h35
1 files changed, 8 insertions, 27 deletions
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h
index b0c1eaf..66994e5 100644
--- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h
+++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h
@@ -2,20 +2,11 @@
#define Power(x, y) (pow(x,y))
#define Sqrt(x) (sqrt(x))
-
-#ifdef KRANC_C
-# define Abs(x) (fabs(x))
-# define Min(x, y) (fmin(x,y))
-# define Min3(x, y, z) (fmin(fmin((x), (y)), (z)))
-# define Max(x, y) (fmax(x,y))
-# define IfThen(x,y,z) ((x) ? (y) : (z))
-#else
-# define Abs(x) (abs(x))
-# define IntAbs(x) (abs(x))
-# define Min(x, y) (min(x,y))
-# define Max(x, y) (max(x,y))
-# define IfThen(x,y,z) ((x)*(y) + (1-(x))*(z))
-#endif
+#define Abs(x) (fabs(x))
+#define Min(x, y) (fmin(x,y))
+#define Min3(x, y, z) (fmin(fmin((x), (y)), (z)))
+#define Max(x, y) (fmax(x,y))
+#define IfThen(x,y,z) ((x) ? (y) : (z))
#define Exp(x) (exp(x))
#define Log(x) (log(x))
@@ -43,23 +34,13 @@
#define Sign(x) (sgn(x))
-#ifdef KRANC_C
-# define ToReal(x) ((CCTK_REAL)(x))
-#else
-# define ToReal(x) (real((x),kind(khalf)))
-#endif
+#define ToReal(x) ((CCTK_REAL)(x))
#define MinMod(x, y) ((x) * (y) < 0 ? 0 : (fabs((x)) < fabs((y)) ? (x) : (y)))
#define VanLeer(x, y) ((x) * (y) < 0 ? 0 : (Min3(2*fabs(x),2*fabs(y),0.5*(fabs(x)+fabs(y)))*Sign((x)+(y))))
-#ifdef KRANC_C
-# define E M_E
-# define Pi M_PI
-
-#else
-# define E 2.71828182845904523536029d0
-# define Pi 3.14159265358979323846264d0
-#endif
+#define E M_E
+#define Pi M_PI
#define StepFunction(x) ((x)>0)