Nested conditionals are compiled so that the user has to think about C++ operator precedence. Additionally, because of the cache, you only get the warning once, which can be easy to miss if running code multiple times.
How to reproduce the bug
With a cleared compilation cache, you get a warning with the following code
Minimal Example (Python)
import dolfinx
from mpi4py import MPI
domain = dolfinx.mesh.create_unit_interval(MPI.COMM_WORLD, 10)
from ufl import FiniteElement, Measure, TestFunction, TrialFunction, conditional, lt, And, Or
V = dolfinx.fem.functionspace(domain, FiniteElement('Lagrange', domain.ufl_cell(), 1))
f = dolfinx.fem.Function(V)
g = TestFunction(V)
dx = Measure('dx', domain=domain)
form = conditional(Or(lt(0, f), And(lt(1, f), lt(f, 2))), 0, 1) * dx
form = dolfinx.fem.form(form)
Summarize the issue
Nested conditionals are compiled so that the user has to think about C++ operator precedence. Additionally, because of the cache, you only get the warning once, which can be easy to miss if running code multiple times.
How to reproduce the bug
With a cleared compilation cache, you get a warning with the following code
Minimal Example (Python)
Output (Python)
No response
Version
0.7.2
DOLFINx git commit
No response
Installation
No response
Additional information
No response