From 1b7ae9aaded8e2c306bdaba4abb386c7157280c0 Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Tue, 5 Mar 2019 10:43:24 +0100
Subject: [PATCH] Removed dead code

---
 kernelcreation.py | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/kernelcreation.py b/kernelcreation.py
index 0cb2c5eb3..8cc012777 100644
--- a/kernelcreation.py
+++ b/kernelcreation.py
@@ -1,6 +1,5 @@
 from types import MappingProxyType
 import sympy as sp
-from pystencils.field import Field
 from pystencils.assignment import Assignment
 from pystencils.astnodes import LoopOverCoordinate, Conditional, Block, SympyAssignment
 from pystencils.cpu.vectorization import vectorize
@@ -159,22 +158,6 @@ def create_indexed_kernel(assignments, index_fields, target='cpu', data_type="do
         raise ValueError("Unknown target %s. Has to be either 'cpu' or 'gpu'" % (target,))
 
 
-def create_staggered_kernel_from_assignments(assignments, **kwargs):
-    assert 'iteration_slice' not in kwargs and 'ghost_layers' not in kwargs
-    lhs_fields = {a.lhs.atoms(Field.Access) for a in assignments}
-    assert len(lhs_fields) == 1
-    staggered_field = lhs_fields.pop()
-    dim = staggered_field.spatial_dimensions
-
-    counters = [LoopOverCoordinate.get_loop_counter_symbol(i) for i in range(dim)]
-    conditions = [counters[i] < staggered_field.shape[i] - 1 for i in range(dim)]
-
-    guarded_assignments = []
-    for d in range(dim):
-        cond = sp.And(*[conditions[i] for i in range(dim) if d != i])
-        guarded_assignments.append(Conditional(cond, Block(assignments)))
-
-
 def create_staggered_kernel(staggered_field, expressions, subexpressions=(), target='cpu', **kwargs):
     """Kernel that updates a staggered field.
 
-- 
GitLab