How to minimise negative errors with coupled non-linear diffusion problems?

If you want to have the same constant for both parts, just use

u_n.vector()[:] = c

before you use “split” in your last example.
For different values have a look here: Interpolation of Indexed Functions of Mixed Elements

1 Like