{"action":"created","issue":{"url":"https://api.github.com/repos/opesci/devito/issues/775","repository_url":"https://api.github.com/repos/opesci/devito","labels_url":"https://api.github.com/repos/opesci/devito/issues/775/labels{/name}","comments_url":"https://api.github.com/repos/opesci/devito/issues/775/comments","events_url":"https://api.github.com/repos/opesci/devito/issues/775/events","html_url":"https://github.com/opesci/devito/pull/775","id":419589593,"node_id":"MDExOlB1bGxSZXF1ZXN0MjYwMDYyMDQ3","number":775,"title":"Clustering support for scalar equations","user":{"login":"FabioLuporini","id":478143,"node_id":"MDQ6VXNlcjQ3ODE0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/478143?v=4","gravatar_id":"","url":"https://api.github.com/users/FabioLuporini","html_url":"https://github.com/FabioLuporini","followers_url":"https://api.github.com/users/FabioLuporini/followers","following_url":"https://api.github.com/users/FabioLuporini/following{/other_user}","gists_url":"https://api.github.com/users/FabioLuporini/gists{/gist_id}","starred_url":"https://api.github.com/users/FabioLuporini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FabioLuporini/subscriptions","organizations_url":"https://api.github.com/users/FabioLuporini/orgs","repos_url":"https://api.github.com/users/FabioLuporini/repos","events_url":"https://api.github.com/users/FabioLuporini/events{/privacy}","received_events_url":"https://api.github.com/users/FabioLuporini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-03-11T17:21:07Z","updated_at":"2019-03-12T18:46:27Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/opesci/devito/pulls/775","html_url":"https://github.com/opesci/devito/pull/775","diff_url":"https://github.com/opesci/devito/pull/775.diff","patch_url":"https://github.com/opesci/devito/pull/775.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/opesci/devito/issues/comments/472133081","html_url":"https://github.com/opesci/devito/pull/775#issuecomment-472133081","issue_url":"https://api.github.com/repos/opesci/devito/issues/775","id":472133081,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MjEzMzA4MQ==","user":{"login":"rhodrin","id":18290049,"node_id":"MDQ6VXNlcjE4MjkwMDQ5","avatar_url":"https://avatars3.githubusercontent.com/u/18290049?v=4","gravatar_id":"","url":"https://api.github.com/users/rhodrin","html_url":"https://github.com/rhodrin","followers_url":"https://api.github.com/users/rhodrin/followers","following_url":"https://api.github.com/users/rhodrin/following{/other_user}","gists_url":"https://api.github.com/users/rhodrin/gists{/gist_id}","starred_url":"https://api.github.com/users/rhodrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhodrin/subscriptions","organizations_url":"https://api.github.com/users/rhodrin/orgs","repos_url":"https://api.github.com/users/rhodrin/repos","events_url":"https://api.github.com/users/rhodrin/events{/privacy}","received_events_url":"https://api.github.com/users/rhodrin/received_events","type":"User","site_admin":false},"created_at":"2019-03-12T18:46:27Z","updated_at":"2019-03-12T18:46:27Z","author_association":"CONTRIBUTOR","body":"Ok nice, the following produces the c loop structure we're looking for:\r\n```\r\nimport numpy as np\r\nfrom devito import Grid, Dimension\r\nfrom devito import Function, TimeFunction, Eq, Constant, Operator, solve\r\nfrom devito.types import Scalar\r\n\r\nn_domains = 10\r\nn = Dimension(name = 'n')\r\n\r\nconst_x = Scalar(name='const_x', dtype=np.int32, is_const=False)\r\nconst_y = Scalar(name='const_y', dtype=np.int32, is_const=False)\r\nbounds_xm = Function(name='bounds_xm', shape=(n_domains, ), dimensions=(n, ))\r\nbounds_ym = Function(name='bounds_ym', shape=(n_domains, ), dimensions=(n, ))\r\n    \r\ngrid = Grid(extent=(10, 10), shape=(10, 10))\r\nt = grid.time_dim\r\nx, y = grid.dimensions\r\n\r\nf = TimeFunction(name='f', grid=grid)\r\nf.data[:] = 0.0\r\neq = Eq(f.dt, 1)\r\n\r\nstencil = Eq(f.forward, solve(eq, f.forward), implicit_dims=[t, n, x, y])\r\n\r\neq_xm = Eq(const_x, bounds_xm[n], implicit_dims=[t, n])\r\neq_ym = Eq(const_y, bounds_ym[n], implicit_dims=[t, n])\r\n\r\nop = Operator([eq_xm, eq_ym, stencil])\r\n```\r\nThe remaining part is now to get this working with subdomains. I was seeing some strange results earlier but they may improve with some further tweaking."}}
{"actor":{"display_login":"rhodrin"}}