WARNING:UFL:Couldn't map 'c_3' to a float, returning ufl object without evaluation

interpolate requires a function as its input, while you are providing dolfinx.fem.Constant object. If you want to fill your function with ones, I guess you can do something like this:

i.e.: ones.x.set(1.0)

1 Like