devitocodes / devito

DSL and compiler framework for automated finite-differences and stencil computation
http://www.devitoproject.org
MIT License
557 stars 225 forks source link

tests: Add test and patch for issue 2325 #2416

Closed EdCaunt closed 2 months ago

EdCaunt commented 2 months ago

Fixes #2325.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.72%. Comparing base (ea94a0f) to head (3e3e963).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2416 +/- ## ========================================== - Coverage 86.72% 86.72% -0.01% ========================================== Files 235 235 Lines 44698 44705 +7 Branches 8286 8287 +1 ========================================== + Hits 38766 38770 +4 - Misses 5207 5208 +1 - Partials 725 727 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mloubout commented 2 months ago

I don't see anything wrong on master


In [1]: from devito import *

In [2]: x = Dimension(name='x')
   ...: cd = ConditionalDimension(name='cd', parent=x, condition=Ge(x, 1))

In [3]: cd._rebuild()._factor

In [4]: cd._rebuild().factor
Out[4]: 1

In [5]: cd.factor
Out[5]: 1

In [6]: cd._factor
EdCaunt commented 2 months ago

Looks like this was actually fixed in a separate patch (blame says @mloubout fixed it 5 days ago). Closing.