diff --git a/grudge/symbolic/compiler.py b/grudge/symbolic/compiler.py index 3aac28bb3c3a8f74d6db255863c811314d464d36..e425fa496411304b88cf305bc13364a1bc95e221 100644 --- a/grudge/symbolic/compiler.py +++ b/grudge/symbolic/compiler.py @@ -1018,7 +1018,7 @@ class ToLoopyInstructionMapper(object): lp.Assignment( expr_mapper(var(name)), expr_mapper(expr), - temp_var_type=lp.auto if dnr else None, + temp_var_type=lp.Optional(None) if dnr else lp.Optional(), no_sync_with=frozenset([ ("*", "any"), ]), diff --git a/grudge/symbolic/primitives.py b/grudge/symbolic/primitives.py index 63adf3dbf7bfa776f35a0691e63967488515fb00..0b9fac20332e505b038ee2ed9bda94485048d8d2 100644 --- a/grudge/symbolic/primitives.py +++ b/grudge/symbolic/primitives.py @@ -40,9 +40,9 @@ from pytools.obj_array import join_fields, make_obj_array # noqa class ExpressionBase(pymbolic.primitives.Expression): - def stringifier(self): + def make_stringifier(self, originating_stringifier=None): from grudge.symbolic.mappers import StringifyMapper - return StringifyMapper + return StringifyMapper() def _sym(): @@ -658,6 +658,10 @@ class TracePair: self.exterior[index], self.interior[index]) + def __len__(self): + assert len(self.exterior) == len(self.interior) + return len(self.exterior) + @property def int(self): return self.interior