Fix the implicit direct forcing bug.

* Be careful when using boolean expressions in equations.
* Add prototype python code for the direct forcing diffusion.