From d3c1d765b67c103f714a22d6d62d0465f1639c09 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Fri, 27 Jan 2012 15:29:53 -0600 Subject: Generate AdvectCaKernel --- Examples/AdvectCaKernel/src/Differencing.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Examples/AdvectCaKernel/src/Differencing.h (limited to 'Examples/AdvectCaKernel/src/Differencing.h') 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 + -- cgit v1.2.3