{"action":"created","comment":{"url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments/241368203","pull_request_review_id":184620392,"id":241368203,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTM2ODIwMw==","diff_hunk":"@@ -129,30 +129,28 @@ void ShiftedMetric::calcYUpDown(Field3D &f) {\n  * Shift the field so that X-Z is not orthogonal,\n  * and Y is then field aligned.\n  */\n-const Field3D ShiftedMetric::toFieldAligned(const Field3D &f) {\n-  return shiftZ(f, toAlignedPhs);\n+const Field3D ShiftedMetric::toFieldAligned(const Field3D &f, const REGION region) {\n+  return shiftZ(f, toAlignedPhs, region);\n }\n \n /*!\n  * Shift back, so that X-Z is orthogonal,\n  * but Y is not field aligned.\n  */\n-const Field3D ShiftedMetric::fromFieldAligned(const Field3D &f) {\n-  return shiftZ(f, fromAlignedPhs);\n+const Field3D ShiftedMetric::fromFieldAligned(const Field3D &f, const REGION region) {\n+  return shiftZ(f, fromAlignedPhs, region);\n }\n \n-const Field3D ShiftedMetric::shiftZ(const Field3D &f, const arr3Dvec &phs) {\n+const Field3D ShiftedMetric::shiftZ(const Field3D &f, const arr3Dvec &phs, const REGION region) {\n   ASSERT1(&mesh == f.getMesh());\n   if(mesh.LocalNz == 1)\n     return f; // Shifting makes no difference\n \n   Field3D result(&mesh);\n   result.allocate();\n-  \n-  for(int jx=0;jx<mesh.LocalNx;jx++) {\n-    for(int jy=0;jy<mesh.LocalNy;jy++) {\n-      shiftZ(f(jx,jy), phs[jx][jy], result(jx,jy));\n-    }\n+\n+  for (const auto &i : mesh.getRegion2D(REGION_STRING(region))) {","path":"src/mesh/parallel/shiftedmetric.cxx","position":34,"original_position":34,"commit_id":"468f8161e9534f0bd4ae495a1af41a01c56f585f","original_commit_id":"468f8161e9534f0bd4ae495a1af41a01c56f585f","user":{"login":"d7919","id":1793698,"node_id":"MDQ6VXNlcjE3OTM2OTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1793698?v=4","gravatar_id":"","url":"https://api.github.com/users/d7919","html_url":"https://github.com/d7919","followers_url":"https://api.github.com/users/d7919/followers","following_url":"https://api.github.com/users/d7919/following{/other_user}","gists_url":"https://api.github.com/users/d7919/gists{/gist_id}","starred_url":"https://api.github.com/users/d7919/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d7919/subscriptions","organizations_url":"https://api.github.com/users/d7919/orgs","repos_url":"https://api.github.com/users/d7919/repos","events_url":"https://api.github.com/users/d7919/events{/privacy}","received_events_url":"https://api.github.com/users/d7919/received_events","type":"User","site_admin":false},"body":"Could this use the `BOUT_FOR`(`_SERIAL` )macro rather than the range based loop?","created_at":"2018-12-13T11:39:57Z","updated_at":"2018-12-13T11:39:57Z","html_url":"https://github.com/boutproject/BOUT-dev/pull/1432#discussion_r241368203","pull_request_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments/241368203"},"html":{"href":"https://github.com/boutproject/BOUT-dev/pull/1432#discussion_r241368203"},"pull_request":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432"}}},"pull_request":{"url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432","id":237389617,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3Mzg5NjE3","html_url":"https://github.com/boutproject/BOUT-dev/pull/1432","diff_url":"https://github.com/boutproject/BOUT-dev/pull/1432.diff","patch_url":"https://github.com/boutproject/BOUT-dev/pull/1432.patch","issue_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/1432","number":1432,"state":"open","locked":false,"title":"Add region arguments for toFieldAligned/fromFieldAligned","user":{"login":"johnomotani","id":3958036,"node_id":"MDQ6VXNlcjM5NTgwMzY=","avatar_url":"https://avatars0.githubusercontent.com/u/3958036?v=4","gravatar_id":"","url":"https://api.github.com/users/johnomotani","html_url":"https://github.com/johnomotani","followers_url":"https://api.github.com/users/johnomotani/followers","following_url":"https://api.github.com/users/johnomotani/following{/other_user}","gists_url":"https://api.github.com/users/johnomotani/gists{/gist_id}","starred_url":"https://api.github.com/users/johnomotani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnomotani/subscriptions","organizations_url":"https://api.github.com/users/johnomotani/orgs","repos_url":"https://api.github.com/users/johnomotani/repos","events_url":"https://api.github.com/users/johnomotani/events{/privacy}","received_events_url":"https://api.github.com/users/johnomotani/received_events","type":"User","site_admin":false},"body":"Add region arguments (where it is valid to give `RGN_NOX` or `RGN_NOBNDRY`) so functions like `toFieldAligned`/`fromFieldAligned` can be used both when y-guard cells have been set and when they have not. e.g. when using `fromFieldAligned` on the results of interpolation or derivatives, y-guard cells cannot be included, but when using `toFieldAligned` on the inputs to interpolation or derivatives, y-guard cells must be included.\r\n\r\nPass `RGN_NOBNDRY` to `fromFieldAligned` in various places where the guard cells aren't valid.\r\n\r\nPulled out of #1176; is independent of other stuff in that PR, which now probably won't be merged.","created_at":"2018-12-10T16:45:40Z","updated_at":"2018-12-13T11:39:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc99df8261579cda7781f8bdb8965442abd457dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432/commits","review_comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432/comments","review_comment_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/1432/comments","statuses_url":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/468f8161e9534f0bd4ae495a1af41a01c56f585f","head":{"label":"boutproject:region-arguments-tofromFieldAligned","ref":"region-arguments-tofromFieldAligned","sha":"468f8161e9534f0bd4ae495a1af41a01c56f585f","user":{"login":"boutproject","id":5280238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyODAyMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"repo":{"id":12783634,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc4MzYzNA==","name":"BOUT-dev","full_name":"boutproject/BOUT-dev","private":false,"owner":{"login":"boutproject","id":5280238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyODAyMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/boutproject/BOUT-dev","description":"BOUT++: Plasma fluid finite-difference simulation code in curvilinear coordinate systems","fork":false,"url":"https://api.github.com/repos/boutproject/BOUT-dev","forks_url":"https://api.github.com/repos/boutproject/BOUT-dev/forks","keys_url":"https://api.github.com/repos/boutproject/BOUT-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boutproject/BOUT-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boutproject/BOUT-dev/teams","hooks_url":"https://api.github.com/repos/boutproject/BOUT-dev/hooks","issue_events_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/events{/number}","events_url":"https://api.github.com/repos/boutproject/BOUT-dev/events","assignees_url":"https://api.github.com/repos/boutproject/BOUT-dev/assignees{/user}","branches_url":"https://api.github.com/repos/boutproject/BOUT-dev/branches{/branch}","tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/tags","blobs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/boutproject/BOUT-dev/languages","stargazers_url":"https://api.github.com/repos/boutproject/BOUT-dev/stargazers","contributors_url":"https://api.github.com/repos/boutproject/BOUT-dev/contributors","subscribers_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscribers","subscription_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscription","commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/boutproject/BOUT-dev/contents/{+path}","compare_url":"https://api.github.com/repos/boutproject/BOUT-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boutproject/BOUT-dev/merges","archive_url":"https://api.github.com/repos/boutproject/BOUT-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boutproject/BOUT-dev/downloads","issues_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues{/number}","pulls_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/boutproject/BOUT-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/boutproject/BOUT-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boutproject/BOUT-dev/labels{/name}","releases_url":"https://api.github.com/repos/boutproject/BOUT-dev/releases{/id}","deployments_url":"https://api.github.com/repos/boutproject/BOUT-dev/deployments","created_at":"2013-09-12T12:57:55Z","updated_at":"2018-12-07T09:02:53Z","pushed_at":"2018-12-13T11:34:31Z","git_url":"git://github.com/boutproject/BOUT-dev.git","ssh_url":"git@github.com:boutproject/BOUT-dev.git","clone_url":"https://github.com/boutproject/BOUT-dev.git","svn_url":"https://github.com/boutproject/BOUT-dev","homepage":"http://boutproject.github.io/","size":44118,"stargazers_count":28,"watchers_count":28,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"archived":false,"open_issues_count":173,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":34,"open_issues":173,"watchers":28,"default_branch":"master"}},"base":{"label":"boutproject:next","ref":"next","sha":"ea2986bdbb250ce257290888150da53a8b11299b","user":{"login":"boutproject","id":5280238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyODAyMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"repo":{"id":12783634,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc4MzYzNA==","name":"BOUT-dev","full_name":"boutproject/BOUT-dev","private":false,"owner":{"login":"boutproject","id":5280238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyODAyMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/boutproject/BOUT-dev","description":"BOUT++: Plasma fluid finite-difference simulation code in curvilinear coordinate systems","fork":false,"url":"https://api.github.com/repos/boutproject/BOUT-dev","forks_url":"https://api.github.com/repos/boutproject/BOUT-dev/forks","keys_url":"https://api.github.com/repos/boutproject/BOUT-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boutproject/BOUT-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boutproject/BOUT-dev/teams","hooks_url":"https://api.github.com/repos/boutproject/BOUT-dev/hooks","issue_events_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/events{/number}","events_url":"https://api.github.com/repos/boutproject/BOUT-dev/events","assignees_url":"https://api.github.com/repos/boutproject/BOUT-dev/assignees{/user}","branches_url":"https://api.github.com/repos/boutproject/BOUT-dev/branches{/branch}","tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/tags","blobs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/boutproject/BOUT-dev/languages","stargazers_url":"https://api.github.com/repos/boutproject/BOUT-dev/stargazers","contributors_url":"https://api.github.com/repos/boutproject/BOUT-dev/contributors","subscribers_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscribers","subscription_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscription","commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/boutproject/BOUT-dev/contents/{+path}","compare_url":"https://api.github.com/repos/boutproject/BOUT-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boutproject/BOUT-dev/merges","archive_url":"https://api.github.com/repos/boutproject/BOUT-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boutproject/BOUT-dev/downloads","issues_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues{/number}","pulls_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/boutproject/BOUT-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/boutproject/BOUT-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boutproject/BOUT-dev/labels{/name}","releases_url":"https://api.github.com/repos/boutproject/BOUT-dev/releases{/id}","deployments_url":"https://api.github.com/repos/boutproject/BOUT-dev/deployments","created_at":"2013-09-12T12:57:55Z","updated_at":"2018-12-07T09:02:53Z","pushed_at":"2018-12-13T11:34:31Z","git_url":"git://github.com/boutproject/BOUT-dev.git","ssh_url":"git@github.com:boutproject/BOUT-dev.git","clone_url":"https://github.com/boutproject/BOUT-dev.git","svn_url":"https://github.com/boutproject/BOUT-dev","homepage":"http://boutproject.github.io/","size":44118,"stargazers_count":28,"watchers_count":28,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"archived":false,"open_issues_count":173,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":34,"open_issues":173,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432"},"html":{"href":"https://github.com/boutproject/BOUT-dev/pull/1432"},"issue":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/issues/1432"},"comments":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/issues/1432/comments"},"review_comments":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432/comments"},"review_comment":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/1432/commits"},"statuses":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/468f8161e9534f0bd4ae495a1af41a01c56f585f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"d7919"}}