FEniCS / dolfinx

Next generation FEniCS problem solving environment
https://fenicsproject.org
GNU Lesser General Public License v3.0
742 stars 178 forks source link

[BUG]: #3215 introduced a regression: cannot have anymore `dx(1)` and `dx` in the same form #3252

Closed francesco-ballarin closed 3 months ago

francesco-ballarin commented 3 months ago

Summarize the issue

3215 seems to have introduced a regression, see https://github.com/FEniCS/dolfinx/compare/main...francesco/regression-3215 for a unit test failing with

TypeError: '<' not supported between instances of 'str' and 'int'

The affected line seems to be https://github.com/FEniCS/dolfinx/blob/373faf035dd8176e57a8b92d028a445f2994d5ca/python/dolfinx/fem/forms.py#L210 , where chain can't cope with having both an int (1, 2 or 3) and a string ("everywhere").

I don't fully understand the logic of the new part of the code, so it's unlikely I'll be able to come up with a fix myself. Feel free to push a fixup on that same branch.

How to reproduce the bug

See https://github.com/FEniCS/dolfinx/compare/main...francesco/regression-3215

Minimal Example (Python)

No response

Output (Python)

No response

Version

main branch

DOLFINx git commit

No response

Installation

No response

Additional information

No response