Skip to content
Snippets Groups Projects

Draft: [FIX] Index fields exclusively containing coordinates are dropped by code generator

Closed Frederik Hennig requested to merge da15siwa/pystencils:index_field_fix into master
3 files
+ 62
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -115,8 +115,6 @@ def create_indexed_kernel(assignments: NodeCollection,
fields_read = assignments.rhs_fields
all_fields = fields_read.union(fields_written)
# extract the index fields based on the name. The original index field might have been modified
index_fields = [idx_field for idx_field in index_fields if idx_field.name in [f.name for f in all_fields]]
non_index_fields = [f for f in all_fields if f not in index_fields]
spatial_coordinates = {f.spatial_dimensions for f in non_index_fields}
assert len(spatial_coordinates) == 1, f"Non-index fields do not have the same number of spatial coordinates " \
Loading