From 412de97723217f9a3731dd5a95b774f21e91da1c Mon Sep 17 00:00:00 2001
From: Marcel Koch <marcel.koch@uni-muenster.de>
Date: Thu, 4 Apr 2019 10:26:24 +0200
Subject: [PATCH] use indirect access only for jacobians

---
 python/dune/codegen/blockstructured/accumulation.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/python/dune/codegen/blockstructured/accumulation.py b/python/dune/codegen/blockstructured/accumulation.py
index 4c0317c2..e649fe02 100644
--- a/python/dune/codegen/blockstructured/accumulation.py
+++ b/python/dune/codegen/blockstructured/accumulation.py
@@ -1,5 +1,5 @@
 from dune.codegen.blockstructured.tools import sub_element_inames, name_accumulation_alias
-from dune.codegen.generation import accumulation_mixin, instruction
+from dune.codegen.generation import accumulation_mixin, instruction, get_global_context_value
 from dune.codegen.loopy.target import dtype_floatingpoint
 from dune.codegen.options import get_form_option
 from dune.codegen.pdelab.geometry import world_dimension, name_intersection_geometry_wrapper
@@ -16,10 +16,10 @@ from loopy.match import Writes
 @accumulation_mixin("blockstructured")
 class BlockStructuredAccumulationMixin(GenericAccumulationMixin):
     def generate_accumulation_instruction(self, expr):
-        if get_form_option('vectorization_blockstructured'):
-            return generate_accumulation_instruction_vectorized(expr, self)
-        else:
+        if get_global_context_value("form_type") == "jacobians":
             return generate_accumulation_instruction(expr, self)
+        else:
+            return generate_accumulation_instruction_vectorized(expr, self)
 
 
 @function_mangler
-- 
GitLab