Custom Newton solver for mixed element spaces

There are many questions/answers regarding Mixed elements on the forum (both for legacy dolfin and dolfinx).

Then you must collapse the function into its sub space (and use the map stemning from FunctionSpace.collapse() to map from the sub space to the parent space.
See for instance: Assigning a scalar expression to mixed function space - #4 by dokken