Skip to content

Commit 25c856a

Browse files
committed
api: fix symbolic coefficient conservation at rebuild
1 parent 9b63f91 commit 25c856a

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎devito/mpatches/.__init__.py.swp‎

-12 KB
Binary file not shown.
-12 KB
Binary file not shown.

‎devito/types/basic.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import numpy as np
88
import sympy
9+
910
from sympy.core.assumptions import _assume_rules
1011
from cached_property import cached_property
1112

@@ -855,11 +856,14 @@ def __str__(self):
855856

856857
__repr__ = __str__
857858

858-
def _sympystr(self, printer):
859+
def _sympystr(self, printer, **kwargs):
859860
return str(self)
860861

861862
_latex = _sympystr
862863

864+
def _pretty(self, printer, **kwargs):
865+
return printer._print_Function(self, func_name=self.name)
866+
863867
def __eq__(self, other):
864868
try:
865869
return (self.function is other.function and

‎devito/types/dense.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class DiscreteFunction(AbstractFunction, ArgProvider, Differentiable):
5757
The type of the underlying data object.
5858
"""
5959

60-
__rkwargs__ = AbstractFunction.__rkwargs__ + ('staggered',)
60+
__rkwargs__ = AbstractFunction.__rkwargs__ + ('staggered', 'coefficients')
6161

6262
def __init_finalize__(self, *args, function=None, **kwargs):
6363
# Staggering metadata

0 commit comments

Comments
 (0)