From 89d99187b6153c21229a1cf00e12b17100ec67be Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Wed, 17 Jul 2019 00:52:31 -0700 Subject: [PATCH] Remove unused code --- opencl_fdtd/kernels/update_h.cl | 17 ---------------- opencl_fdtd/kernels/update_s.cl | 36 --------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 opencl_fdtd/kernels/update_s.cl diff --git a/opencl_fdtd/kernels/update_h.cl b/opencl_fdtd/kernels/update_h.cl index a709486..a8a6b04 100644 --- a/opencl_fdtd/kernels/update_h.cl +++ b/opencl_fdtd/kernels/update_h.cl @@ -55,23 +55,6 @@ if ({{r}} == s{{r}} - 1) { } {%- endfor %} -{%- if do_poynting %} - - -/* - * Precalculate averaged E - */ -ftype aExy = Ex[i + py] + Ex[i]; -ftype aExz = Ex[i + pz] + Ex[i]; - -ftype aEyx = Ey[i + px] + Ey[i]; -ftype aEyz = Ey[i + pz] + Ey[i]; - -ftype aEzx = Ez[i + px] + Ez[i]; -ftype aEzy = Ez[i + py] + Ez[i]; -{%- endif %} - - /* diff --git a/opencl_fdtd/kernels/update_s.cl b/opencl_fdtd/kernels/update_s.cl deleted file mode 100644 index 94e061e..0000000 --- a/opencl_fdtd/kernels/update_s.cl +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Update E-field, including any PMLs. - * - * Template parameters: - * common_header: Rendered contents of common.cl - * pmls: [('x', 'n'), ('z', 'p'),...] list of pml axes and polarities - * pml_thickness: Number of cells (integer) - * - * OpenCL args: - * E, H, dt, S, oS - */ - -{{common_header}} - -////////////////////////////////////////////////////////////////////// - - -/* - * Calculate S from oS (pre-calculated components) - */ -__global ftype *Sx = S + XX; -__global ftype *Sy = S + YY; -__global ftype *Sz = S + ZZ; - -// Use unscaled S components from H locations -__global ftype *oSxy = oS + 0 * field_size; -__global ftype *oSyz = oS + 1 * field_size; -__global ftype *oSzx = oS + 2 * field_size; -__global ftype *oSxz = oS + 3 * field_size; -__global ftype *oSyx = oS + 4 * field_size; -__global ftype *oSzy = oS + 5 * field_size; - -ftype s_factor = dt * 0.125; -Sx[i] = (oSxy[i] + oSxz[i] + oSxy[i + my] + oSxz[i + mz]) * s_factor; -Sy[i] = (oSyz[i] + oSyx[i] + oSyz[i + mz] + oSyx[i + mx]) * s_factor; -Sz[i] = (oSzx[i] + oSzy[i] + oSzx[i + mx] + oSzy[i + my]) * s_factor;