1 parent 33c3b12 commit c78d41fCopy full SHA for c78d41f
2 files changed
devito/symbolics/extended_sympy.py
@@ -263,6 +263,12 @@ def base(self):
263
def bound_symbols(self):
264
return {self.call}
265
266
+ @property
267
+ def canonical_variables(self):
268
+ # `call` is bound to keep it out of `free_symbols`, but it names a C
269
+ # call or member and therefore must not be canonicalized by SymPy
270
+ return {}
271
+
272
@property
273
def free_symbols(self):
274
return super().free_symbols - self.bound_symbols
tests/test_symbolics.py
@@ -306,6 +306,7 @@ def test_field_from_composite():
306
# Test reconstruction
307
ffc3 = ffc0.func(*ffc0.args)
308
assert ffc0 == ffc3
309
+ assert ffc1.as_dummy() == ffc1
310
311
# Free symbols
312
assert ffc1.free_symbols == {s}
0 commit comments