aboutsummaryrefslogtreecommitdiff
path: root/Auxiliary
diff options
context:
space:
mode:
authorBarry Wardell <barry.wardell@gmail.com>2012-02-04 12:19:08 +0000
committerBarry Wardell <barry.wardell@gmail.com>2012-02-04 13:32:44 +0000
commit5e3e89e6c71a5e2a4254ad9f529382941b97d639 (patch)
tree54a115cb8ff562f9462c7a61fa172b552f8a2535 /Auxiliary
parentc56affb26178da968ea96bd4ed6ca6ea7f17ee93 (diff)
parent809e125e21c83dc8c126ddf1e41f9bf74d09bcf5 (diff)
Merge remote-tracking branch 'origin/dgfe'
Conflicts: Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h Tools/CodeGen/CodeGenCactus.m Tools/CodeGen/Kranc.m Tools/CodeGen/Thorn.m
Diffstat (limited to 'Auxiliary')
-rw-r--r--Auxiliary/Cactus/KrancNumericalTools/GenericFD/configuration.ccl4
-rw-r--r--Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h13
-rw-r--r--Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h37
3 files changed, 3 insertions, 51 deletions
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/configuration.ccl b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/configuration.ccl
index 664b79a..477b219 100644
--- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/configuration.ccl
+++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/configuration.ccl
@@ -7,7 +7,3 @@ PROVIDES GenericFD
SCRIPT
LANG
}
-
-OPTIONAL Vectors
-{
-}
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h
index ace83a0..5884d70 100644
--- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h
+++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h
@@ -48,20 +48,11 @@ extern "C" {
/* var is a pointer to a grid point, i,j,k are offsets with respect
to that point.
For example: KRANC_GFINDEX3D_OFFSET(&u[ind3d],-1,-1,0) */
-#ifndef VECTORISE
- /* standard, thorn Vectors is not used */
/* simple implementation */
- /* # define KRANC_GFOFFSET3D(var,i,j,k) ((var)[di*(i)+dj*(j)+dk*(k)]) */
+ /* #define KRANC_GFOFFSET3D(var,i,j,k) ((var)[di*(i)+dj*(j)+dk*(k)]) */
/* more efficient implementation for some compilers */
-# define KRANC_GFOFFSET3D(var,i,j,k) \
+#define KRANC_GFOFFSET3D(var,i,j,k) \
(*(CCTK_REAL const*)&((char const*)(var))[cdi*(i)+cdj*(j)+cdk*(k)])
-#else
- /* vectorised version */
-# define KRANC_GFOFFSET3D(var,i,j,k) \
- vec_loadu_maybe3((i),(j),(k), \
- *(CCTK_REAL const*)& \
- ((char const*)(var))[cdi*(i)+cdj*(j)+cdk*(k)])
-#endif
int sgn(CCTK_REAL x);
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h
index 72a05f9..390fb6a 100644
--- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h
+++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h
@@ -1,18 +1,10 @@
-
-#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 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
@@ -28,33 +20,6 @@
#define VanLeer(x, y) ((x) * (y) < 0 ? 0 : (Min3(2*fabs(x),2*fabs(y),0.5*(fabs(x)+fabs(y)))*Sign((x)+(y))))
-#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 ArcSin(x) (asin(x))
-#define ArcCos(x) (acos(x))
-#define ArcTan(x) (atan(x))
-#define ArcTan2(x,y) (atan2(y,x))
-
-#define Sinh(x) (sinh(x))
-#define Cosh(x) (cosh(x))
-#define Tanh(x) (tanh(x))
-
-#define Csch(x) (1./sinh(x))
-#define Sech(x) (1./cosh(x))
-
-#ifdef KRANC_C
-# define Sign(x) (copysign(1.0,(x)))
-# define ToReal(x) ((CCTK_REAL)(x))
-#else
-# define Sign(x) (sgn(x))
-# define ToReal(x) (real((x),kind(khalf)))
-#endif
-
#ifdef KRANC_C
# define E M_E
# define Pi M_PI