{"action":"created","comment":{"url":"https://api.github.com/repos/firedrakeproject/dcore/pulls/comments/55846382","id":55846382,"diff_hunk":"@@ -80,18 +81,56 @@ def dump(self):\n                         self.xout[i].assign(xn[i])\n                         self.Files[i] << self.xout[i]\n \n-    def initialise(self, u0, rho0, theta0):\n+    def initialise(self, initial_conditions):\n         \"\"\"\n-        Initialise state variables from expressions.\n-        :arg u0: :class:`.Function` object, initial u\n-        :arg rho0: :class:`.Function` object, initial rho\n-        :arg theta0: :class:`.Function` object, initial theta\n+        Initialise state variables\n         \"\"\"\n \n-        u_init, rho_init, theta_init = self.x_init.split()\n-        u_init.project(u0)\n-        rho_init.project(rho0)\n-        theta_init.project(theta0)\n+        for i in range(self.x_init.function_space().num_sub_spaces()):\n+            self.x_init.sub(i).project(initial_conditions[i])","path":"dcore/state.py","position":68,"original_position":68,"commit_id":"86d3812981db21c08777905d81a866468f4ee54d","original_commit_id":"86d3812981db21c08777905d81a866468f4ee54d","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},"body":"AKA:\r\n\r\n```python\r\nfor x, ic in zip(self.x_init.split(), initial_conditions):\r\n    x.project(ic)\r\n```","created_at":"2016-03-11T15:48:03Z","updated_at":"2016-03-11T15:48:03Z","html_url":"https://github.com/firedrakeproject/dcore/pull/21#discussion_r55846382","pull_request_url":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/firedrakeproject/dcore/pulls/comments/55846382"},"html":{"href":"https://github.com/firedrakeproject/dcore/pull/21#discussion_r55846382"},"pull_request":{"href":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21","id":62558132,"html_url":"https://github.com/firedrakeproject/dcore/pull/21","diff_url":"https://github.com/firedrakeproject/dcore/pull/21.diff","patch_url":"https://github.com/firedrakeproject/dcore/pull/21.patch","issue_url":"https://api.github.com/repos/firedrakeproject/dcore/issues/21","number":21,"state":"open","locked":false,"title":"State metaclass","user":{"login":"jshipton","id":6875594,"avatar_url":"https://avatars.githubusercontent.com/u/6875594?v=3","gravatar_id":"","url":"https://api.github.com/users/jshipton","html_url":"https://github.com/jshipton","followers_url":"https://api.github.com/users/jshipton/followers","following_url":"https://api.github.com/users/jshipton/following{/other_user}","gists_url":"https://api.github.com/users/jshipton/gists{/gist_id}","starred_url":"https://api.github.com/users/jshipton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshipton/subscriptions","organizations_url":"https://api.github.com/users/jshipton/orgs","repos_url":"https://api.github.com/users/jshipton/repos","events_url":"https://api.github.com/users/jshipton/events{/privacy}","received_events_url":"https://api.github.com/users/jshipton/received_events","type":"User","site_admin":false},"body":"State is now a metaclass so that it can be subclassed for use in both 3D compressible Euler and shallow water codes.","created_at":"2016-03-11T15:26:51Z","updated_at":"2016-03-11T15:48:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"391a7b5978a11b1fdf7703c1a6b229f3ff787549","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21/commits","review_comments_url":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21/comments","review_comment_url":"https://api.github.com/repos/firedrakeproject/dcore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firedrakeproject/dcore/issues/21/comments","statuses_url":"https://api.github.com/repos/firedrakeproject/dcore/statuses/86d3812981db21c08777905d81a866468f4ee54d","head":{"label":"firedrakeproject:state_metaclass","ref":"state_metaclass","sha":"86d3812981db21c08777905d81a866468f4ee54d","user":{"login":"firedrakeproject","id":5558005,"avatar_url":"https://avatars.githubusercontent.com/u/5558005?v=3","gravatar_id":"","url":"https://api.github.com/users/firedrakeproject","html_url":"https://github.com/firedrakeproject","followers_url":"https://api.github.com/users/firedrakeproject/followers","following_url":"https://api.github.com/users/firedrakeproject/following{/other_user}","gists_url":"https://api.github.com/users/firedrakeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/firedrakeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firedrakeproject/subscriptions","organizations_url":"https://api.github.com/users/firedrakeproject/orgs","repos_url":"https://api.github.com/users/firedrakeproject/repos","events_url":"https://api.github.com/users/firedrakeproject/events{/privacy}","received_events_url":"https://api.github.com/users/firedrakeproject/received_events","type":"Organization","site_admin":false},"repo":{"id":49564954,"name":"dcore","full_name":"firedrakeproject/dcore","owner":{"login":"firedrakeproject","id":5558005,"avatar_url":"https://avatars.githubusercontent.com/u/5558005?v=3","gravatar_id":"","url":"https://api.github.com/users/firedrakeproject","html_url":"https://github.com/firedrakeproject","followers_url":"https://api.github.com/users/firedrakeproject/followers","following_url":"https://api.github.com/users/firedrakeproject/following{/other_user}","gists_url":"https://api.github.com/users/firedrakeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/firedrakeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firedrakeproject/subscriptions","organizations_url":"https://api.github.com/users/firedrakeproject/orgs","repos_url":"https://api.github.com/users/firedrakeproject/repos","events_url":"https://api.github.com/users/firedrakeproject/events{/privacy}","received_events_url":"https://api.github.com/users/firedrakeproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/firedrakeproject/dcore","description":"Three dimensional atmospheric dynamical core using the Gung Ho numerics.","fork":false,"url":"https://api.github.com/repos/firedrakeproject/dcore","forks_url":"https://api.github.com/repos/firedrakeproject/dcore/forks","keys_url":"https://api.github.com/repos/firedrakeproject/dcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firedrakeproject/dcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firedrakeproject/dcore/teams","hooks_url":"https://api.github.com/repos/firedrakeproject/dcore/hooks","issue_events_url":"https://api.github.com/repos/firedrakeproject/dcore/issues/events{/number}","events_url":"https://api.github.com/repos/firedrakeproject/dcore/events","assignees_url":"https://api.github.com/repos/firedrakeproject/dcore/assignees{/user}","branches_url":"https://api.github.com/repos/firedrakeproject/dcore/branches{/branch}","tags_url":"https://api.github.com/repos/firedrakeproject/dcore/tags","blobs_url":"https://api.github.com/repos/firedrakeproject/dcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firedrakeproject/dcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firedrakeproject/dcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/firedrakeproject/dcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firedrakeproject/dcore/statuses/{sha}","languages_url":"https://api.github.com/repos/firedrakeproject/dcore/languages","stargazers_url":"https://api.github.com/repos/firedrakeproject/dcore/stargazers","contributors_url":"https://api.github.com/repos/firedrakeproject/dcore/contributors","subscribers_url":"https://api.github.com/repos/firedrakeproject/dcore/subscribers","subscription_url":"https://api.github.com/repos/firedrakeproject/dcore/subscription","commits_url":"https://api.github.com/repos/firedrakeproject/dcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/firedrakeproject/dcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/firedrakeproject/dcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/firedrakeproject/dcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/firedrakeproject/dcore/contents/{+path}","compare_url":"https://api.github.com/repos/firedrakeproject/dcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firedrakeproject/dcore/merges","archive_url":"https://api.github.com/repos/firedrakeproject/dcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firedrakeproject/dcore/downloads","issues_url":"https://api.github.com/repos/firedrakeproject/dcore/issues{/number}","pulls_url":"https://api.github.com/repos/firedrakeproject/dcore/pulls{/number}","milestones_url":"https://api.github.com/repos/firedrakeproject/dcore/milestones{/number}","notifications_url":"https://api.github.com/repos/firedrakeproject/dcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firedrakeproject/dcore/labels{/name}","releases_url":"https://api.github.com/repos/firedrakeproject/dcore/releases{/id}","deployments_url":"https://api.github.com/repos/firedrakeproject/dcore/deployments","created_at":"2016-01-13T09:51:17Z","updated_at":"2016-01-13T14:11:16Z","pushed_at":"2016-03-11T15:26:51Z","git_url":"git://github.com/firedrakeproject/dcore.git","ssh_url":"git@github.com:firedrakeproject/dcore.git","clone_url":"https://github.com/firedrakeproject/dcore.git","svn_url":"https://github.com/firedrakeproject/dcore","homepage":null,"size":96,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"firedrakeproject:master","ref":"master","sha":"aa8018ce551394f156ff92470f409acab75e3072","user":{"login":"firedrakeproject","id":5558005,"avatar_url":"https://avatars.githubusercontent.com/u/5558005?v=3","gravatar_id":"","url":"https://api.github.com/users/firedrakeproject","html_url":"https://github.com/firedrakeproject","followers_url":"https://api.github.com/users/firedrakeproject/followers","following_url":"https://api.github.com/users/firedrakeproject/following{/other_user}","gists_url":"https://api.github.com/users/firedrakeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/firedrakeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firedrakeproject/subscriptions","organizations_url":"https://api.github.com/users/firedrakeproject/orgs","repos_url":"https://api.github.com/users/firedrakeproject/repos","events_url":"https://api.github.com/users/firedrakeproject/events{/privacy}","received_events_url":"https://api.github.com/users/firedrakeproject/received_events","type":"Organization","site_admin":false},"repo":{"id":49564954,"name":"dcore","full_name":"firedrakeproject/dcore","owner":{"login":"firedrakeproject","id":5558005,"avatar_url":"https://avatars.githubusercontent.com/u/5558005?v=3","gravatar_id":"","url":"https://api.github.com/users/firedrakeproject","html_url":"https://github.com/firedrakeproject","followers_url":"https://api.github.com/users/firedrakeproject/followers","following_url":"https://api.github.com/users/firedrakeproject/following{/other_user}","gists_url":"https://api.github.com/users/firedrakeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/firedrakeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firedrakeproject/subscriptions","organizations_url":"https://api.github.com/users/firedrakeproject/orgs","repos_url":"https://api.github.com/users/firedrakeproject/repos","events_url":"https://api.github.com/users/firedrakeproject/events{/privacy}","received_events_url":"https://api.github.com/users/firedrakeproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/firedrakeproject/dcore","description":"Three dimensional atmospheric dynamical core using the Gung Ho numerics.","fork":false,"url":"https://api.github.com/repos/firedrakeproject/dcore","forks_url":"https://api.github.com/repos/firedrakeproject/dcore/forks","keys_url":"https://api.github.com/repos/firedrakeproject/dcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firedrakeproject/dcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firedrakeproject/dcore/teams","hooks_url":"https://api.github.com/repos/firedrakeproject/dcore/hooks","issue_events_url":"https://api.github.com/repos/firedrakeproject/dcore/issues/events{/number}","events_url":"https://api.github.com/repos/firedrakeproject/dcore/events","assignees_url":"https://api.github.com/repos/firedrakeproject/dcore/assignees{/user}","branches_url":"https://api.github.com/repos/firedrakeproject/dcore/branches{/branch}","tags_url":"https://api.github.com/repos/firedrakeproject/dcore/tags","blobs_url":"https://api.github.com/repos/firedrakeproject/dcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firedrakeproject/dcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firedrakeproject/dcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/firedrakeproject/dcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firedrakeproject/dcore/statuses/{sha}","languages_url":"https://api.github.com/repos/firedrakeproject/dcore/languages","stargazers_url":"https://api.github.com/repos/firedrakeproject/dcore/stargazers","contributors_url":"https://api.github.com/repos/firedrakeproject/dcore/contributors","subscribers_url":"https://api.github.com/repos/firedrakeproject/dcore/subscribers","subscription_url":"https://api.github.com/repos/firedrakeproject/dcore/subscription","commits_url":"https://api.github.com/repos/firedrakeproject/dcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/firedrakeproject/dcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/firedrakeproject/dcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/firedrakeproject/dcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/firedrakeproject/dcore/contents/{+path}","compare_url":"https://api.github.com/repos/firedrakeproject/dcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firedrakeproject/dcore/merges","archive_url":"https://api.github.com/repos/firedrakeproject/dcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firedrakeproject/dcore/downloads","issues_url":"https://api.github.com/repos/firedrakeproject/dcore/issues{/number}","pulls_url":"https://api.github.com/repos/firedrakeproject/dcore/pulls{/number}","milestones_url":"https://api.github.com/repos/firedrakeproject/dcore/milestones{/number}","notifications_url":"https://api.github.com/repos/firedrakeproject/dcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firedrakeproject/dcore/labels{/name}","releases_url":"https://api.github.com/repos/firedrakeproject/dcore/releases{/id}","deployments_url":"https://api.github.com/repos/firedrakeproject/dcore/deployments","created_at":"2016-01-13T09:51:17Z","updated_at":"2016-01-13T14:11:16Z","pushed_at":"2016-03-11T15:26:51Z","git_url":"git://github.com/firedrakeproject/dcore.git","ssh_url":"git@github.com:firedrakeproject/dcore.git","clone_url":"https://github.com/firedrakeproject/dcore.git","svn_url":"https://github.com/firedrakeproject/dcore","homepage":null,"size":96,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21"},"html":{"href":"https://github.com/firedrakeproject/dcore/pull/21"},"issue":{"href":"https://api.github.com/repos/firedrakeproject/dcore/issues/21"},"comments":{"href":"https://api.github.com/repos/firedrakeproject/dcore/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/firedrakeproject/dcore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firedrakeproject/dcore/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/firedrakeproject/dcore/statuses/86d3812981db21c08777905d81a866468f4ee54d"}}}}