{"action":"opened","issue":{"url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/529","labels_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/529/labels{/name}","comments_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/529/comments","events_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/529/events","html_url":"https://github.com/firedrakeproject/firedrake/issues/529","id":81981480,"number":529,"title":"COFFEE breaks jacobian of conditionals","user":{"login":"anriseth","id":5601805,"avatar_url":"https://avatars.githubusercontent.com/u/5601805?v=3","gravatar_id":"","url":"https://api.github.com/users/anriseth","html_url":"https://github.com/anriseth","followers_url":"https://api.github.com/users/anriseth/followers","following_url":"https://api.github.com/users/anriseth/following{/other_user}","gists_url":"https://api.github.com/users/anriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/anriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anriseth/subscriptions","organizations_url":"https://api.github.com/users/anriseth/orgs","repos_url":"https://api.github.com/users/anriseth/repos","events_url":"https://api.github.com/users/anriseth/events{/privacy}","received_events_url":"https://api.github.com/users/anriseth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-28T15:23:46Z","updated_at":"2015-05-28T15:23:46Z","closed_at":null,"body":"I have to disable COFFEE to get a correct jacobian of a form involving conditinals. \r\nExample code:\r\n```python\r\nfrom firedrake import *\r\nmesh = UnitIntervalMesh(10)\r\nV = FunctionSpace(mesh, \"DG\", 0)\r\nu = Function(V)\r\ndu = TrialFunction(V)\r\nv = TestFunction(V)\r\nbhp = Constant(2)\r\nu.dat.data[...] = range(10)\r\ncond = conditional(ge(u-bhp, 0.0), u-bhp, 0.0)\r\nFc = cond*v * dx\r\nprint \"\\n Jacobian of conditional\"\r\nprint assemble(derivative(Fc, u, du)).M.values\r\n``` \r\n\r\nWith COFFEE, I get\r\n```\r\n  Jacobian of conditional\r\n[[ 0.1  0.   0.   0.   0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.1  0.   0.   0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.1  0.   0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.1  0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.1  0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.1  0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.1  0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.   0.1  0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.   0.   0.1  0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.   0.   0.   0.1]]\r\n```\r\n\r\nWithout COFFEE, I get\r\n```\r\n[[ 0.   0.   0.   0.   0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.1  0.   0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.1  0.   0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.1  0.   0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.1  0.   0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.1  0.   0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.   0.1  0.   0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.   0.   0.1  0. ]\r\n [ 0.   0.   0.   0.   0.   0.   0.   0.   0.   0.1]]\r\n```"}}