I can define spatially varying parameters using
Expression like this:
E = Expression("E0*x", E0=2, degree=0)
How can I do that discretely throughout the domain? I mean it is like:
if x<1 E=1
If your expression is simple you could also use C++'s ternary operator
E = Expression("(x < 1.0) ? E1 : E2", E1=E1, E2=E2, degree=0)
Ideally you could use the functional syntax of dolfinx.