diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-05-20 20:15:40 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-05-20 20:15:40 +0200 |
commit | 619979658ab49e2f4682b346a7831bcf98804b52 (patch) | |
tree | eda09665d21785522b77ba1fa80563a9a32ce3e4 /Examples/AdvectCaKernel | |
parent | 519f2cd182c4828e74429e883139fbb8b1a11d3c (diff) |
Regenerate examples
Diffstat (limited to 'Examples/AdvectCaKernel')
-rw-r--r-- | Examples/AdvectCaKernel/schedule.ccl | 5 | ||||
-rw-r--r-- | Examples/AdvectCaKernel/src/Boundaries.cc | 2 | ||||
-rw-r--r-- | Examples/AdvectCaKernel/src/CaKernel__initial_gaussian.code | 38 | ||||
-rw-r--r-- | Examples/AdvectCaKernel/src/Differencing.h | 6 | ||||
-rw-r--r-- | Examples/AdvectCaKernel/src/RegisterMoL.cc | 2 | ||||
-rw-r--r-- | Examples/AdvectCaKernel/src/Startup.cc | 2 |
6 files changed, 27 insertions, 28 deletions
diff --git a/Examples/AdvectCaKernel/schedule.ccl b/Examples/AdvectCaKernel/schedule.ccl index f0cafb4..e57a2d6 100644 --- a/Examples/AdvectCaKernel/schedule.ccl +++ b/Examples/AdvectCaKernel/schedule.ccl @@ -22,8 +22,8 @@ schedule CAKERNEL_Launch_initial_gaussian as initial_gaussian AT INITIAL { LANG: C TAGS: Device=1 - READS: grid::x - WRITES: AdvectCaKernel::phi + READS: grid::x(Everywhere) + WRITES: AdvectCaKernel::phi(Everywhere) } "initial_gaussian" schedule AdvectCaKernel_SelectBoundConds in MoL_PostStep @@ -52,5 +52,4 @@ schedule AdvectCaKernel_Init in CCTK_BASEGRID after Accelerator_SetDevice schedule group ApplyBCs as AdvectCaKernel_ApplyBCs in MoL_PostStep after AdvectCaKernel_SelectBoundConds { - # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/Examples/AdvectCaKernel/src/Boundaries.cc b/Examples/AdvectCaKernel/src/Boundaries.cc index 03d5618..a915d26 100644 --- a/Examples/AdvectCaKernel/src/Boundaries.cc +++ b/Examples/AdvectCaKernel/src/Boundaries.cc @@ -30,7 +30,7 @@ extern "C" void AdvectCaKernel_SelectBoundConds(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; - CCTK_INT ierr = 0; + CCTK_INT ierr CCTK_ATTRIBUTE_UNUSED = 0; return; } diff --git a/Examples/AdvectCaKernel/src/CaKernel__initial_gaussian.code b/Examples/AdvectCaKernel/src/CaKernel__initial_gaussian.code index c239ee0..0b78570 100644 --- a/Examples/AdvectCaKernel/src/CaKernel__initial_gaussian.code +++ b/Examples/AdvectCaKernel/src/CaKernel__initial_gaussian.code @@ -19,25 +19,25 @@ CAKERNEL_initial_gaussian_Begin /* Include user-supplied include files */ /* Initialise finite differencing variables */ - CCTK_REAL const dx = params.cagh_dx; - CCTK_REAL const dy = params.cagh_dy; - CCTK_REAL const dz = params.cagh_dz; - CCTK_REAL const dt = params.cagh_dt; - CCTK_REAL const t = params.cagh_time; - CCTK_REAL const dxi = INV(dx); - CCTK_REAL const dyi = INV(dy); - CCTK_REAL const dzi = INV(dz); - CCTK_REAL const khalf = 0.5; - CCTK_REAL const kthird = 1/3.0; - CCTK_REAL const ktwothird = 2.0/3.0; - CCTK_REAL const kfourthird = 4.0/3.0; - CCTK_REAL const keightthird = 8.0/3.0; - CCTK_REAL const hdxi = 0.5 * dxi; - CCTK_REAL const hdyi = 0.5 * dyi; - CCTK_REAL const hdzi = 0.5 * dzi; + CCTK_REAL /*const*/ dx CCTK_ATTRIBUTE_UNUSED = params.cagh_dx; + CCTK_REAL /*const*/ dy CCTK_ATTRIBUTE_UNUSED = params.cagh_dy; + CCTK_REAL /*const*/ dz CCTK_ATTRIBUTE_UNUSED = params.cagh_dz; + CCTK_REAL /*const*/ dt CCTK_ATTRIBUTE_UNUSED = params.cagh_dt; + CCTK_REAL /*const*/ t CCTK_ATTRIBUTE_UNUSED = params.cagh_time; + CCTK_REAL /*const*/ dxi CCTK_ATTRIBUTE_UNUSED = INV(dx); + CCTK_REAL /*const*/ dyi CCTK_ATTRIBUTE_UNUSED = INV(dy); + CCTK_REAL /*const*/ dzi CCTK_ATTRIBUTE_UNUSED = INV(dz); + CCTK_REAL /*const*/ khalf CCTK_ATTRIBUTE_UNUSED = 0.5; + CCTK_REAL /*const*/ kthird CCTK_ATTRIBUTE_UNUSED = 1/3.0; + CCTK_REAL /*const*/ ktwothird CCTK_ATTRIBUTE_UNUSED = 2.0/3.0; + CCTK_REAL /*const*/ kfourthird CCTK_ATTRIBUTE_UNUSED = 4.0/3.0; + CCTK_REAL /*const*/ keightthird CCTK_ATTRIBUTE_UNUSED = 8.0/3.0; + CCTK_REAL /*const*/ hdxi CCTK_ATTRIBUTE_UNUSED = 0.5 * dxi; + CCTK_REAL /*const*/ hdyi CCTK_ATTRIBUTE_UNUSED = 0.5 * dyi; + CCTK_REAL /*const*/ hdzi CCTK_ATTRIBUTE_UNUSED = 0.5 * dzi; /* Initialize predefined quantities */ - CCTK_REAL const p1odx = INV(dx); + CCTK_REAL /*const*/ p1odx CCTK_ATTRIBUTE_UNUSED = INV(dx); /* Assign local copies of arrays functions */ @@ -50,7 +50,7 @@ CAKERNEL_initial_gaussian_Begin /* Assign local copies of grid functions */ - CCTK_REAL xL = I3D(x,0,0,0); + CCTK_REAL xL CCTK_ATTRIBUTE_UNUSED = I3D(x,0,0,0); /* Include user supplied include files */ @@ -58,7 +58,7 @@ CAKERNEL_initial_gaussian_Begin /* Precompute derivatives */ /* Calculate temporaries and grid functions */ - CCTK_REAL phiL = exp(-100.*SQR(xL + t)); + CCTK_REAL CCTK_ATTRIBUTE_UNUSED phiL = exp(-100.*SQR(xL + t)); /* Copy local copies back to grid functions */ I3D(phi,0,0,0) = phiL; diff --git a/Examples/AdvectCaKernel/src/Differencing.h b/Examples/AdvectCaKernel/src/Differencing.h index 2dc688d..deea999 100644 --- a/Examples/AdvectCaKernel/src/Differencing.h +++ b/Examples/AdvectCaKernel/src/Differencing.h @@ -1,12 +1,12 @@ #ifndef KRANC_DIFF_FUNCTIONS -# define PDstandard1(u) ((-KRANC_GFOFFSET3D(u,0,0,0) + KRANC_GFOFFSET3D(u,1,0,0))*p1odx) +# define PDstandard1(u) ((-1.*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; + ptrdiff_t const cdi CCTK_ATTRIBUTE_UNUSED = sizeof(CCTK_REAL); + return (-1.*KRANC_GFOFFSET3D(u,0,0,0) + KRANC_GFOFFSET3D(u,1,0,0))*p1odx; } #endif diff --git a/Examples/AdvectCaKernel/src/RegisterMoL.cc b/Examples/AdvectCaKernel/src/RegisterMoL.cc index bce1435..1920dbb 100644 --- a/Examples/AdvectCaKernel/src/RegisterMoL.cc +++ b/Examples/AdvectCaKernel/src/RegisterMoL.cc @@ -9,7 +9,7 @@ extern "C" void AdvectCaKernel_RegisterVars(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; - CCTK_INT ierr = 0; + CCTK_INT ierr CCTK_ATTRIBUTE_UNUSED = 0; /* Register all the evolved grid functions with MoL */ diff --git a/Examples/AdvectCaKernel/src/Startup.cc b/Examples/AdvectCaKernel/src/Startup.cc index ba99b79..af4d6c1 100644 --- a/Examples/AdvectCaKernel/src/Startup.cc +++ b/Examples/AdvectCaKernel/src/Startup.cc @@ -4,7 +4,7 @@ extern "C" int AdvectCaKernel_Startup(void) { - const char * banner = "AdvectCaKernel"; + const char * banner CCTK_ATTRIBUTE_UNUSED = "AdvectCaKernel"; CCTK_RegisterBanner(banner); return 0; } |