Skip to content

Commit

Permalink
api: fix symbolic coefficient conservation at rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Aug 22, 2023
1 parent a38ea46 commit fd5b167
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devito/types/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ def __str__(self):

__repr__ = __str__

def _sympystr(self, printer):
def _sympystr(self, printer, **kwargs):
return str(self)

_latex = _sympystr
Expand Down
3 changes: 2 additions & 1 deletion devito/types/dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def __init_finalize__(self, *args, function=None, **kwargs):
super(DiscreteFunction, self).__init_finalize__(*args, **kwargs)

# Symbolic (finite difference) coefficients
self._coefficients = kwargs.get('coefficients', 'standard')
self._coefficients = kwargs.get('coefficients',
getattr(function, 'coefficients', 'standard'))
if self._coefficients not in ('standard', 'symbolic'):
raise ValueError("coefficients must be `standard` or `symbolic`")

Expand Down

0 comments on commit fd5b167

Please sign in to comment.