Skip to content

Commit

Permalink
compiler: Strengthen AbstractSubDimension.init
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Jul 17, 2024
1 parent e34ecde commit a35c7db
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions devito/types/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,13 @@ def __init_finalize__(self, name, parent, thickness, functions=None,
elif all(isinstance(i, tuple) and len(i) == 2 for i in thickness):
(ltkn, _), (rtkn, _) = thickness

left = parent.symbolic_min + ltkn
right = parent.symbolic_max - rtkn
try:
left = parent.symbolic_min + ltkn
right = parent.symbolic_max - rtkn
except TypeError:
# May end up here after a reconstruction
left = sympy.S.NegativeInfinity
right = sympy.S.Infinity
else:
raise ValueError("MultiSubDimension expects a tuple of thicknesses")

Expand Down

0 comments on commit a35c7db

Please sign in to comment.