From 25c856ad944e1253f0cf959b3560e18cead6ca1a Mon Sep 17 00:00:00 2001 From: mloubout Date: Mon, 21 Aug 2023 22:12:38 -0400 Subject: [PATCH] api: fix symbolic coefficient conservation at rebuild --- devito/mpatches/.__init__.py.swp | Bin 12288 -> 0 bytes devito/mpatches/.rationaltools.py.swp | Bin 12288 -> 0 bytes devito/types/basic.py | 6 +++++- devito/types/dense.py | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 devito/mpatches/.__init__.py.swp delete mode 100644 devito/mpatches/.rationaltools.py.swp diff --git a/devito/mpatches/.__init__.py.swp b/devito/mpatches/.__init__.py.swp deleted file mode 100644 index 48f848b3e8678b2eef767d23fc7e5bf397b8c404..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI%K}*9h6u|K}@1p1zhz^7a>zWDTSMcC*9xd70VW4el8wOtVgYCL+;m-R8yW4i| zScIK6_&*4b@RCRJyM;`{*XI}Y6pW>gOOe%P9ls6kWP2epPxYg23r(>*k}4T4bQtRH zC2i$v*Kiak3+vrJWrgvx_oNy{kz^+5I_I{1Q0*~fm0RmMNhu#!=L?Kpx2R4^?sZi0R#|0009ILKmY**5I_I{1Vl_M zvaJ95f9lcv|L@=b?HnKk5I_I{1Q0*~0R#|0009ILICg<~=`t0R##@)0)H|0}%4UTt Ny}DPbuX6WcNmVs>m1OB*{vEPB;fM0;qz`H;SBtRGVX**-5fTO^Tz?auB_A2lS@F;LS z@Ws`Py$QSlJPF(ce03FLF9NH;-N0U8CvXSw&y|dQ2Yd^h2Hpam2d2OTxEELgJm4bW zn=2Um8h96Y4bZ?*;0Q1PZUJrve!ZNr&w$d1SsGh-~iAC z{=O8k0v`ZpfLDO$fED0Y;0JL0J@7H`5pW849e53R9ykb49-g_Fv4??&fSZB8>wlcN z0PE|2?6NMCtn`eUNHdi=-^c4)W=FOd_A(Wh+FSS1iY~XFw6(-pYB&10xr)u7BC;x+ zhQH@8>0Zat)h9}_I2xaWGB*esai?+<%~xuzO(#Tm(fi6NQBKJBXcoA9M=`) zhCEfqa@bwyraIG6s*Om4s?z%WfY4FkWI{RKK&%_sv13P-iO#GCuRAE`U3}2B_q+G@ zX5FQkb#njy{qsK887z_L9*mOklAB7>^`h#`8fyMa$$AwF1!TY~DZ8YV#0kxR4Q34E8m6BQ%4+R=5C%;~T?oJ7;`f6Z}zlEQJ00<0RZ z7zM61^I4yleSTtYb|F3nvO-;TWq8sH zXmP|tdY;J~T|40-p2$%yqQI(|s^fA^=6#qHW-+f0YDnrdS1EQJa5GYI6z~M602S&! z*UIY9iVue(6S?Ws^IW4C4!NGHA`a_bg96Pte4C1NB14ZKQbt-G2TFuE1{1X8`lpWJ`5y-GxF+etGuFTgY7n&zUFs1996jzMeB-B}K66|qe@n2{wdq4mH diff --git a/devito/types/basic.py b/devito/types/basic.py index 51dbba181e..d7a422b39e 100644 --- a/devito/types/basic.py +++ b/devito/types/basic.py @@ -6,6 +6,7 @@ import numpy as np import sympy + from sympy.core.assumptions import _assume_rules from cached_property import cached_property @@ -855,11 +856,14 @@ def __str__(self): __repr__ = __str__ - def _sympystr(self, printer): + def _sympystr(self, printer, **kwargs): return str(self) _latex = _sympystr + def _pretty(self, printer, **kwargs): + return printer._print_Function(self, func_name=self.name) + def __eq__(self, other): try: return (self.function is other.function and diff --git a/devito/types/dense.py b/devito/types/dense.py index 19f6aa4769..aec69bc1eb 100644 --- a/devito/types/dense.py +++ b/devito/types/dense.py @@ -57,7 +57,7 @@ class DiscreteFunction(AbstractFunction, ArgProvider, Differentiable): The type of the underlying data object. """ - __rkwargs__ = AbstractFunction.__rkwargs__ + ('staggered',) + __rkwargs__ = AbstractFunction.__rkwargs__ + ('staggered', 'coefficients') def __init_finalize__(self, *args, function=None, **kwargs): # Staggering metadata