Skip to content
Snippets Groups Projects
Commit 412de977 authored by Marcel Koch's avatar Marcel Koch
Browse files

use indirect access only for jacobians

parent 721aef39
No related branches found
No related tags found
No related merge requests found
from dune.codegen.blockstructured.tools import sub_element_inames, name_accumulation_alias 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.loopy.target import dtype_floatingpoint
from dune.codegen.options import get_form_option from dune.codegen.options import get_form_option
from dune.codegen.pdelab.geometry import world_dimension, name_intersection_geometry_wrapper from dune.codegen.pdelab.geometry import world_dimension, name_intersection_geometry_wrapper
...@@ -16,10 +16,10 @@ from loopy.match import Writes ...@@ -16,10 +16,10 @@ from loopy.match import Writes
@accumulation_mixin("blockstructured") @accumulation_mixin("blockstructured")
class BlockStructuredAccumulationMixin(GenericAccumulationMixin): class BlockStructuredAccumulationMixin(GenericAccumulationMixin):
def generate_accumulation_instruction(self, expr): def generate_accumulation_instruction(self, expr):
if get_form_option('vectorization_blockstructured'): if get_global_context_value("form_type") == "jacobians":
return generate_accumulation_instruction_vectorized(expr, self)
else:
return generate_accumulation_instruction(expr, self) return generate_accumulation_instruction(expr, self)
else:
return generate_accumulation_instruction_vectorized(expr, self)
@function_mangler @function_mangler
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment