From 2dc9bd4aeb8c008ffb2679d230d35f4bddf93397 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Sat, 11 Feb 2012 13:04:44 +0100 Subject: MathematicaCompat.h: Restore macros These were removed in c9ec36148e7d255006d732fb16c00c6a64cfa4c9, but this causes existing thorns to fail to compile. We keep them here for compatibility. --- .../GenericFD/src/MathematicaCompat.h | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'Auxiliary/Cactus') diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h index a0e5540..252116c 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h @@ -1,14 +1,45 @@ + +#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 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 Sqrt(x) (sqrt(x)) # define IfThen(x,y,z) ((x)*(y) + (1-(x))*(z)) #endif +#define Exp(x) (exp(x)) +#define Log(x) (log(x)) + +#define Sin(x) (sin(x)) +#define Cos(x) (cos(x)) +#define Tan(x) (tan(x)) +#define Sec(x) (1.0/cos(x)) +#define Csc(x) (1.0/sin(x)) +#define Cot(x) (1.0/tan(x)) + +#define ArcSin(x) (asin(x)) +#define ArcCos(x) (acos(x)) +#define ArcTan(x) (atan(x)) +#define ArcSec(x) (cos(1.0/(x))) +#define ArcCsc(x) (sin(1.0/(x))) +#define ArcCot(x) (tan(1.0/(x))) + +#define Sinh(x) (sinh(x)) +#define Cosh(x) (cosh(x)) +#define Tanh(x) (tanh(x)) +#define Sech(x) (1.0/cosh(x)) +#define Csch(x) (1.0/sinh(x)) +#define Coth(x) (1.0/tanh(x)) + #ifdef KRANC_C # define Sign(x) (copysign( (CCTK_REAL) 1.0,(CCTK_REAL) (x))) # define ToReal(x) ((CCTK_REAL)(x)) -- cgit v1.2.3