Reactive terms that depend on the value of the field variables and other condition

You should collapse the sub space, project into the collapsed sub-space and use a FunctionAssigner as done in:

and
https://bitbucket.org/fenics-project/dolfin/raw/ec57db53f2b13f1768214829e8b4f80fc32205cf/python/demo/undocumented/sub-function-assignment/demo_sub-function-assignment.py