Skip to content
Snippets Groups Projects
Commit 7e2aa52f authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Fix KernelFunction.fields_read

parent 84502428
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ import itertools
import pystencils
from pystencils.astnodes import KernelFunction, ResolvedFieldAccess, SympyAssignment
from pystencils.interpolation_astnodes import InterpolatorAccess
def compatibility_hacks():
......@@ -22,7 +23,8 @@ def compatibility_hacks():
def fields_read(self):
assignments = self.atoms(SympyAssignment)
return set().union(itertools.chain.from_iterable([f.field for f in a.rhs.free_symbols if hasattr(f, 'field')]
return set().union(itertools.chain.from_iterable([f.field for f in a.rhs.free_symbols
| a.rhs.atoms(InterpolatorAccess) if hasattr(f, 'field')]
for a in assignments))
_pystencils_fields = pystencils.fields
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment