From 07c4bc1b02a76e0ffb41f5c8127b3364d095105f Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Tue, 29 Jan 2019 13:26:11 +0100
Subject: [PATCH] [bugfix] Avoid circular imports

---
 python/dune/codegen/sumfact/geometry.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/python/dune/codegen/sumfact/geometry.py b/python/dune/codegen/sumfact/geometry.py
index 102df6ee..cef07354 100644
--- a/python/dune/codegen/sumfact/geometry.py
+++ b/python/dune/codegen/sumfact/geometry.py
@@ -39,12 +39,8 @@ from dune.codegen.sumfact.permutation import (permute_backward,
                                               sumfact_quadrature_permutation_strategy,
                                               )
 from dune.codegen.sumfact.quadrature import additional_inames
-from dune.codegen.sumfact.realization import (name_buffer_storage,
-                                              realize_sum_factorization_kernel,
-                                              )
 from dune.codegen.sumfact.switch import get_facedir, get_facemod
 from dune.codegen.sumfact.symbolic import SumfactKernelInterfaceBase, SumfactKernel
-from dune.codegen.sumfact.vectorization import attach_vectorization_info
 from dune.codegen.tools import get_pymbolic_basename
 from dune.codegen.options import get_form_option, option_switch
 from dune.codegen.ufl.modified_terminals import Restriction
@@ -425,6 +421,7 @@ class GeoCornersInput(SumfactKernelInterfaceBase, ImmutableRecord):
 
         # The array that will be passed to the sum factorization kernel
         # function should contain the coefficients in the cost permuted order!
+        from dune.codegen.sumfact.realization import name_buffer_storage
         name = "input_{}".format(sf.buffer)
         ftags = ",".join(["f"] * (sf.length + 1))
         temporary_variable(name,
@@ -543,6 +540,7 @@ def _name_jacobian(i, j, restriction, visitor):
     sf = SumfactKernel(matrix_sequence=matrix_sequence,
                        interface=inp,
                        )
+    from dune.codegen.sumfact.vectorization import attach_vectorization_info
     vsf = attach_vectorization_info(sf)
 
     # If this sum factorization kernel was not used in the dry run we
@@ -553,6 +551,7 @@ def _name_jacobian(i, j, restriction, visitor):
 
     # Add a sum factorization kernel that implements the evaluation of
     # the basis functions at quadrature points (stage 1)
+    from dune.codegen.sumfact.realization import realize_sum_factorization_kernel
     var, _ = realize_sum_factorization_kernel(vsf)
 
     assert(visitor.indices is None)
-- 
GitLab