diff --git a/hog/operator_generation/indexing.py b/hog/operator_generation/indexing.py index 7dda587e19bf5470cd9bc95056e1ebbfe172a135..8c6e3dcb6c483cd4ee940a2fdf23dd7b72fb49cf 100644 --- a/hog/operator_generation/indexing.py +++ b/hog/operator_generation/indexing.py @@ -21,6 +21,7 @@ from typing import Any, List, Tuple, Union from pystencils import TypedSymbol from pystencils.sympyextensions.integer_functions import int_div +from pystencils.sympyextensions.typed_sympy import CastFunc, DynamicType from pystencils.backend.kernelcreation import KernelCreationContext from pystencils.types.quick import UInt @@ -685,7 +686,9 @@ def element_vertex_coordinates( for vertex_index in vertex_indices: vertex_coordinate = macro_vertex_coordinates[0] for i in range(geometry.dimensions): - vertex_coordinate += steps[i] * vertex_index.primitive_index[i] + vertex_coordinate += steps[i] * CastFunc( + vertex_index.primitive_index[i], DynamicType.NUMERIC_TYPE + ) vertex_coordinates.append(vertex_coordinate) return vertex_coordinates diff --git a/hog/operator_generation/operators.py b/hog/operator_generation/operators.py index db507b5f9a7a29b24c46a14c50f21af0d6935b1e..c0f45ab976153dbefc27083e84d4b49aa8f56b86 100644 --- a/hog/operator_generation/operators.py +++ b/hog/operator_generation/operators.py @@ -910,7 +910,7 @@ class HyTeGElementwiseOperator: ) coords_assignments = [ - SympyAssignment( + Assignment( element_vertex_coordinates_symbols[vertex][component], el_vertex_coordinates[vertex][component], ) diff --git a/pyproject.toml b/pyproject.toml index ff39e75e7c4229213d046045981ca7d59574ac23..9704da6896ec0ac5d1e0b42c8786508d8906793a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ dependencies = [ "numpy==1.24.3", "quadpy-gpl==0.16.10", "poly-cse-py", - "pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@0c86a9b6ba2c5ef0cebd6382b1133b0ea15e7002", + "pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@05aa74d24f481a4dad5a026e438e70112feb6813", "pytest==7.3.1", "sympy==1.11.1", "tabulate==0.9.0", diff --git a/requirements.txt b/requirements.txt index a8bc744b5b9ccb996ad4a34b2f91d5f62f229264..2eb74d4b3c52bcb01d025816d379c7dc69cbd41b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ islpy numpy==1.24.3 poly-cse-py -pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@0c86a9b6ba2c5ef0cebd6382b1133b0ea15e7002 +pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@05aa74d24f481a4dad5a026e438e70112feb6813 pytest==7.3.1 sympy==1.11.1 tabulate==0.9.0