aboutsummaryrefslogtreecommitdiff
path: root/Examples/AdvectCaKernel/src/Differencing.h
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2012-01-27 15:29:53 -0600
committerIan Hinder <ian.hinder@aei.mpg.de>2012-01-27 15:29:53 -0600
commitd3c1d765b67c103f714a22d6d62d0465f1639c09 (patch)
treed4e4a945eac6f1ab6cb72922f39374f1084795d7 /Examples/AdvectCaKernel/src/Differencing.h
parenta0a05deb807f386f0a81db0f2c9256bfbfd16947 (diff)
Generate AdvectCaKernel
Diffstat (limited to 'Examples/AdvectCaKernel/src/Differencing.h')
-rw-r--r--Examples/AdvectCaKernel/src/Differencing.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Examples/AdvectCaKernel/src/Differencing.h b/Examples/AdvectCaKernel/src/Differencing.h
new file mode 100644
index 0000000..2dc688d
--- /dev/null
+++ b/Examples/AdvectCaKernel/src/Differencing.h
@@ -0,0 +1,12 @@
+#ifndef KRANC_DIFF_FUNCTIONS
+# define PDstandard1(u) ((-KRANC_GFOFFSET3D(u,0,0,0) + KRANC_GFOFFSET3D(u,1,0,0))*p1odx)
+#else
+# define PDstandard1(u) (PDstandard1_impl(u,p1odx,cdj,cdk))
+static CCTK_REAL PDstandard1_impl(CCTK_REAL const* restrict const u, CCTK_REAL const p1odx, ptrdiff_t const cdj, ptrdiff_t const cdk) CCTK_ATTRIBUTE_NOINLINE CCTK_ATTRIBUTE_UNUSED;
+static CCTK_REAL PDstandard1_impl(CCTK_REAL const* restrict const u, CCTK_REAL const p1odx, ptrdiff_t const cdj, ptrdiff_t const cdk)
+{
+ ptrdiff_t const cdi=sizeof(CCTK_REAL);
+ return (-KRANC_GFOFFSET3D(u,0,0,0) + KRANC_GFOFFSET3D(u,1,0,0))*p1odx;
+}
+#endif
+