{"action":"created","issue":{"url":"https://api.github.com/repos/coneoproject/COFFEE/issues/53","labels_url":"https://api.github.com/repos/coneoproject/COFFEE/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/coneoproject/COFFEE/issues/53/comments","events_url":"https://api.github.com/repos/coneoproject/COFFEE/issues/53/events","html_url":"https://github.com/coneoproject/COFFEE/issues/53","id":81981255,"number":53,"title":"Conditionals not dealt with correctly","user":{"login":"wence-","id":1126981,"avatar_url":"https://avatars.githubusercontent.com/u/1126981?v=3","gravatar_id":"","url":"https://api.github.com/users/wence-","html_url":"https://github.com/wence-","followers_url":"https://api.github.com/users/wence-/followers","following_url":"https://api.github.com/users/wence-/following{/other_user}","gists_url":"https://api.github.com/users/wence-/gists{/gist_id}","starred_url":"https://api.github.com/users/wence-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wence-/subscriptions","organizations_url":"https://api.github.com/users/wence-/orgs","repos_url":"https://api.github.com/users/wence-/repos","events_url":"https://api.github.com/users/wence-/events{/privacy}","received_events_url":"https://api.github.com/users/wence-/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-28T15:23:26Z","updated_at":"2015-06-01T16:20:49Z","closed_at":null,"body":"Consider the following:\r\n\r\n```python\r\nfrom firedrake import *\r\nparameters[\"coffee\"][\"O2\"] = True\r\nmesh = UnitIntervalMesh(4)\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\n\r\nJc = conditional(ge(u - bhp, 0.0), 1.0, 0.0)*du*v*dx\r\nJm = conditional(gt(u - bhp, 0.0), 1.0, 0.0)*du*v*dx\r\nprint assemble(Jc).M.values.diagonal()\r\nprint assemble(Jm).M.values.diagonal()\r\n```\r\n\r\nI expect to see:\r\n```\r\n[ 0.    0.    0.25  0.25]\r\n[ 0.    0.    0.    0.25]\r\n```\r\nand do so with coffee off.\r\nWhen on, I instead see:\r\n\r\n```\r\n[ 0.25  0.25  0.25  0.25]\r\n[ 0.  0.  0.  0.]\r\n```\r\n\r\nFWIW, I suspect this is somehow a problem that some of the conditional stuff in ffc is built as strings, rather than ast nodes."},"comment":{"url":"https://api.github.com/repos/coneoproject/COFFEE/issues/comments/107619928","html_url":"https://github.com/coneoproject/COFFEE/issues/53#issuecomment-107619928","issue_url":"https://api.github.com/repos/coneoproject/COFFEE/issues/53","id":107619928,"user":{"login":"wence-","id":1126981,"avatar_url":"https://avatars.githubusercontent.com/u/1126981?v=3","gravatar_id":"","url":"https://api.github.com/users/wence-","html_url":"https://github.com/wence-","followers_url":"https://api.github.com/users/wence-/followers","following_url":"https://api.github.com/users/wence-/following{/other_user}","gists_url":"https://api.github.com/users/wence-/gists{/gist_id}","starred_url":"https://api.github.com/users/wence-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wence-/subscriptions","organizations_url":"https://api.github.com/users/wence-/orgs","repos_url":"https://api.github.com/users/wence-/repos","events_url":"https://api.github.com/users/wence-/events{/privacy}","received_events_url":"https://api.github.com/users/wence-/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T16:20:49Z","updated_at":"2015-06-01T16:20:49Z","body":"Please don't. It is a standalone fix that should be merged separately"}}