devito icon indicating copy to clipboard operation
devito copied to clipboard

Rebuilding a `ConditionalDimension` with no factor adds a factor.

Open EdCaunt opened this issue 1 year ago • 2 comments

If a ConditionalDimension is created with factor=None, then self._factor is set to None, but self.factor will return 1. As such, when rebuilding a ConditionalDimension with no factor, a factor of 1 is added unexpectedly, changing the generated code.

EdCaunt avatar Mar 04 '24 19:03 EdCaunt

Is there an MFE for this?

georgebisbas avatar May 10 '24 15:05 georgebisbas

Create a ConditionalDimension with a condition but no factor, then compare cd._factor to cd._rebuild()._factor

EdCaunt avatar May 17 '24 10:05 EdCaunt