{"action":"created","comment":{"url":"https://api.github.com/repos/idaholab/moose/pulls/comments/69813516","id":69813516,"diff_hunk":"@@ -95,29 +95,48 @@ MultiSmoothSuperellipsoidIC::computeSuperellipsoidSemiaxes()\n {\n   for (unsigned int i = 0; i < _numbub[_gk]; i++)\n   {\n-    //Vary bubble radius\n     switch (_semiaxis_variation_type)\n     {\n-    case 0: //Uniform distrubtion\n-      _as.push_back(_semiaxis_a[_gk]*(1.0 + (1.0 - 2.0 * _random.rand(_tid)) * _semiaxis_a_variation[_gk]));\n-      _bs.push_back(_semiaxis_b[_gk]*(1.0 + (1.0 - 2.0 * _random.rand(_tid)) * _semiaxis_b_variation[_gk]));\n-      _cs.push_back(_semiaxis_c[_gk]*(1.0 + (1.0 - 2.0 * _random.rand(_tid)) * _semiaxis_c_variation[_gk]));\n-      break;\n-    case 1: //Normal distribution\n-      _as.push_back(_random.randNormal(_tid, _semiaxis_a[_gk],_semiaxis_a_variation[_gk]));\n-      _bs.push_back(_random.randNormal(_tid, _semiaxis_b[_gk],_semiaxis_b_variation[_gk]));\n-      _cs.push_back(_random.randNormal(_tid, _semiaxis_c[_gk],_semiaxis_c_variation[_gk]));\n-      break;\n-    case 2: //No variation\n-      _as.push_back(_semiaxis_a[_gk]);\n-      _bs.push_back(_semiaxis_b[_gk]);\n-      _cs.push_back(_semiaxis_c[_gk]);\n-    }\n+      case 0: //Uniform distrubtion\n+        if (_vary_axes_independently)\n+        {\n+          _as.push_back(_semiaxis_a[_gk] * (1.0 + (1.0 - 2.0 * _random.rand(_tid)) * _semiaxis_a_variation[_gk]));\n+          _bs.push_back(_semiaxis_b[_gk] * (1.0 + (1.0 - 2.0 * _random.rand(_tid)) * _semiaxis_b_variation[_gk]));\n+          _cs.push_back(_semiaxis_c[_gk] * (1.0 + (1.0 - 2.0 * _random.rand(_tid)) * _semiaxis_c_variation[_gk]));\n+        }\n+        else\n+        {\n+          const Real randnum = _random.rand(_tid);\n+          _as.push_back(_semiaxis_a[_gk] * (1.0 + (1.0 - 2.0 * randnum) * _semiaxis_a_variation[_gk]));\n+          _bs.push_back(_semiaxis_b[_gk] * (1.0 + (1.0 - 2.0 * randnum) * _semiaxis_b_variation[_gk]));\n+          _cs.push_back(_semiaxis_c[_gk] * (1.0 + (1.0 - 2.0 * randnum) * _semiaxis_c_variation[_gk]));\n+        }\n+        break;\n \n-    if (_as.back() < 0.0) _as.back() = 0.0;\n-    if (_bs.back() < 0.0) _bs.back() = 0.0;\n-    if (_cs.back() < 0.0) _cs.back() = 0.0;\n+      case 1: //Normal distribution\n+        if (_vary_axes_independently)\n+        {\n+          _as.push_back(_random.randNormal(_tid, _semiaxis_a[_gk],_semiaxis_a_variation[_gk]));\n+          _bs.push_back(_random.randNormal(_tid, _semiaxis_b[_gk],_semiaxis_b_variation[_gk]));\n+          _cs.push_back(_random.randNormal(_tid, _semiaxis_c[_gk],_semiaxis_c_variation[_gk]));\n+        }\n+        else\n+        {\n+          const Real randnum = _random.randNormal(_tid, 0, 1);\n+          _as.push_back(_semiaxis_a[_gk] + (randnum * _semiaxis_a_variation[_gk]));\n+          _bs.push_back(_semiaxis_b[_gk] + (randnum * _semiaxis_b_variation[_gk]));\n+          _cs.push_back(_semiaxis_c[_gk] + (randnum * _semiaxis_c_variation[_gk]));\n+        }\n+        break;\n \n+      case 2: //No variation\n+        _as.push_back(_semiaxis_a[_gk]);\n+        _bs.push_back(_semiaxis_b[_gk]);\n+        _cs.push_back(_semiaxis_c[_gk]);","path":"modules/phase_field/src/ics/MultiSmoothSuperellipsoidIC.C","position":88,"original_position":88,"commit_id":"14de3bef397d6ccb15d94be07c25b86024fcbf83","original_commit_id":"14de3bef397d6ccb15d94be07c25b86024fcbf83","user":{"login":"FHilty","id":14181200,"avatar_url":"https://avatars.githubusercontent.com/u/14181200?v=3","gravatar_id":"","url":"https://api.github.com/users/FHilty","html_url":"https://github.com/FHilty","followers_url":"https://api.github.com/users/FHilty/followers","following_url":"https://api.github.com/users/FHilty/following{/other_user}","gists_url":"https://api.github.com/users/FHilty/gists{/gist_id}","starred_url":"https://api.github.com/users/FHilty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FHilty/subscriptions","organizations_url":"https://api.github.com/users/FHilty/orgs","repos_url":"https://api.github.com/users/FHilty/repos","events_url":"https://api.github.com/users/FHilty/events{/privacy}","received_events_url":"https://api.github.com/users/FHilty/received_events","type":"User","site_admin":false},"body":"I can do that, it just seemed like a headache to keep track of which index I need to write to across each set of shapes it is generating instead of just adding them at the end as I went. I am thinking I can use the global index _gk to work out exactly which index i need inside the loops of computerSuperellipsoidCenters, computeSuperellipsoidExponents, and computeSuperellipsoidSemiaxes.\r\n\r\nIs there a reason push_back is undesirable?","created_at":"2016-07-06T21:19:26Z","updated_at":"2016-07-06T21:19:26Z","html_url":"https://github.com/idaholab/moose/pull/7282#discussion_r69813516","pull_request_url":"https://api.github.com/repos/idaholab/moose/pulls/7282","_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments/69813516"},"html":{"href":"https://github.com/idaholab/moose/pull/7282#discussion_r69813516"},"pull_request":{"href":"https://api.github.com/repos/idaholab/moose/pulls/7282"}}},"pull_request":{"url":"https://api.github.com/repos/idaholab/moose/pulls/7282","id":76465018,"html_url":"https://github.com/idaholab/moose/pull/7282","diff_url":"https://github.com/idaholab/moose/pull/7282.diff","patch_url":"https://github.com/idaholab/moose/pull/7282.patch","issue_url":"https://api.github.com/repos/idaholab/moose/issues/7282","number":7282,"state":"open","locked":false,"title":"Lets semiaxes vary independently.","user":{"login":"FHilty","id":14181200,"avatar_url":"https://avatars.githubusercontent.com/u/14181200?v=3","gravatar_id":"","url":"https://api.github.com/users/FHilty","html_url":"https://github.com/FHilty","followers_url":"https://api.github.com/users/FHilty/followers","following_url":"https://api.github.com/users/FHilty/following{/other_user}","gists_url":"https://api.github.com/users/FHilty/gists{/gist_id}","starred_url":"https://api.github.com/users/FHilty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FHilty/subscriptions","organizations_url":"https://api.github.com/users/FHilty/orgs","repos_url":"https://api.github.com/users/FHilty/repos","events_url":"https://api.github.com/users/FHilty/events{/privacy}","received_events_url":"https://api.github.com/users/FHilty/received_events","type":"User","site_admin":false},"body":"Closes #7281","created_at":"2016-07-06T16:51:54Z","updated_at":"2016-07-06T21:19:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e21cebc4aa168bd11dc138b395773c1ca21582c9","assignee":{"login":"dschwen","id":202302,"avatar_url":"https://avatars.githubusercontent.com/u/202302?v=3","gravatar_id":"","url":"https://api.github.com/users/dschwen","html_url":"https://github.com/dschwen","followers_url":"https://api.github.com/users/dschwen/followers","following_url":"https://api.github.com/users/dschwen/following{/other_user}","gists_url":"https://api.github.com/users/dschwen/gists{/gist_id}","starred_url":"https://api.github.com/users/dschwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschwen/subscriptions","organizations_url":"https://api.github.com/users/dschwen/orgs","repos_url":"https://api.github.com/users/dschwen/repos","events_url":"https://api.github.com/users/dschwen/events{/privacy}","received_events_url":"https://api.github.com/users/dschwen/received_events","type":"User","site_admin":false},"assignees":[{"login":"dschwen","id":202302,"avatar_url":"https://avatars.githubusercontent.com/u/202302?v=3","gravatar_id":"","url":"https://api.github.com/users/dschwen","html_url":"https://github.com/dschwen","followers_url":"https://api.github.com/users/dschwen/followers","following_url":"https://api.github.com/users/dschwen/following{/other_user}","gists_url":"https://api.github.com/users/dschwen/gists{/gist_id}","starred_url":"https://api.github.com/users/dschwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschwen/subscriptions","organizations_url":"https://api.github.com/users/dschwen/orgs","repos_url":"https://api.github.com/users/dschwen/repos","events_url":"https://api.github.com/users/dschwen/events{/privacy}","received_events_url":"https://api.github.com/users/dschwen/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/idaholab/moose/pulls/7282/commits","review_comments_url":"https://api.github.com/repos/idaholab/moose/pulls/7282/comments","review_comment_url":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/idaholab/moose/issues/7282/comments","statuses_url":"https://api.github.com/repos/idaholab/moose/statuses/14de3bef397d6ccb15d94be07c25b86024fcbf83","head":{"label":"FHilty:similarshapes","ref":"similarshapes","sha":"14de3bef397d6ccb15d94be07c25b86024fcbf83","user":{"login":"FHilty","id":14181200,"avatar_url":"https://avatars.githubusercontent.com/u/14181200?v=3","gravatar_id":"","url":"https://api.github.com/users/FHilty","html_url":"https://github.com/FHilty","followers_url":"https://api.github.com/users/FHilty/followers","following_url":"https://api.github.com/users/FHilty/following{/other_user}","gists_url":"https://api.github.com/users/FHilty/gists{/gist_id}","starred_url":"https://api.github.com/users/FHilty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FHilty/subscriptions","organizations_url":"https://api.github.com/users/FHilty/orgs","repos_url":"https://api.github.com/users/FHilty/repos","events_url":"https://api.github.com/users/FHilty/events{/privacy}","received_events_url":"https://api.github.com/users/FHilty/received_events","type":"User","site_admin":false},"repo":{"id":62735035,"name":"moose","full_name":"FHilty/moose","owner":{"login":"FHilty","id":14181200,"avatar_url":"https://avatars.githubusercontent.com/u/14181200?v=3","gravatar_id":"","url":"https://api.github.com/users/FHilty","html_url":"https://github.com/FHilty","followers_url":"https://api.github.com/users/FHilty/followers","following_url":"https://api.github.com/users/FHilty/following{/other_user}","gists_url":"https://api.github.com/users/FHilty/gists{/gist_id}","starred_url":"https://api.github.com/users/FHilty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FHilty/subscriptions","organizations_url":"https://api.github.com/users/FHilty/orgs","repos_url":"https://api.github.com/users/FHilty/repos","events_url":"https://api.github.com/users/FHilty/events{/privacy}","received_events_url":"https://api.github.com/users/FHilty/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FHilty/moose","description":"Multiphysics Object Oriented Simulation Environment","fork":true,"url":"https://api.github.com/repos/FHilty/moose","forks_url":"https://api.github.com/repos/FHilty/moose/forks","keys_url":"https://api.github.com/repos/FHilty/moose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FHilty/moose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FHilty/moose/teams","hooks_url":"https://api.github.com/repos/FHilty/moose/hooks","issue_events_url":"https://api.github.com/repos/FHilty/moose/issues/events{/number}","events_url":"https://api.github.com/repos/FHilty/moose/events","assignees_url":"https://api.github.com/repos/FHilty/moose/assignees{/user}","branches_url":"https://api.github.com/repos/FHilty/moose/branches{/branch}","tags_url":"https://api.github.com/repos/FHilty/moose/tags","blobs_url":"https://api.github.com/repos/FHilty/moose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FHilty/moose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FHilty/moose/git/refs{/sha}","trees_url":"https://api.github.com/repos/FHilty/moose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FHilty/moose/statuses/{sha}","languages_url":"https://api.github.com/repos/FHilty/moose/languages","stargazers_url":"https://api.github.com/repos/FHilty/moose/stargazers","contributors_url":"https://api.github.com/repos/FHilty/moose/contributors","subscribers_url":"https://api.github.com/repos/FHilty/moose/subscribers","subscription_url":"https://api.github.com/repos/FHilty/moose/subscription","commits_url":"https://api.github.com/repos/FHilty/moose/commits{/sha}","git_commits_url":"https://api.github.com/repos/FHilty/moose/git/commits{/sha}","comments_url":"https://api.github.com/repos/FHilty/moose/comments{/number}","issue_comment_url":"https://api.github.com/repos/FHilty/moose/issues/comments{/number}","contents_url":"https://api.github.com/repos/FHilty/moose/contents/{+path}","compare_url":"https://api.github.com/repos/FHilty/moose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FHilty/moose/merges","archive_url":"https://api.github.com/repos/FHilty/moose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FHilty/moose/downloads","issues_url":"https://api.github.com/repos/FHilty/moose/issues{/number}","pulls_url":"https://api.github.com/repos/FHilty/moose/pulls{/number}","milestones_url":"https://api.github.com/repos/FHilty/moose/milestones{/number}","notifications_url":"https://api.github.com/repos/FHilty/moose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FHilty/moose/labels{/name}","releases_url":"https://api.github.com/repos/FHilty/moose/releases{/id}","deployments_url":"https://api.github.com/repos/FHilty/moose/deployments","created_at":"2016-07-06T16:07:21Z","updated_at":"2016-07-06T16:07:34Z","pushed_at":"2016-07-06T20:13:33Z","git_url":"git://github.com/FHilty/moose.git","ssh_url":"git@github.com:FHilty/moose.git","clone_url":"https://github.com/FHilty/moose.git","svn_url":"https://github.com/FHilty/moose","homepage":"http://www.mooseframework.org","size":132320,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"idaholab:devel","ref":"devel","sha":"f987aa25a85968fcf9b6e70825d46df5e3012974","user":{"login":"idaholab","id":3855370,"avatar_url":"https://avatars.githubusercontent.com/u/3855370?v=3","gravatar_id":"","url":"https://api.github.com/users/idaholab","html_url":"https://github.com/idaholab","followers_url":"https://api.github.com/users/idaholab/followers","following_url":"https://api.github.com/users/idaholab/following{/other_user}","gists_url":"https://api.github.com/users/idaholab/gists{/gist_id}","starred_url":"https://api.github.com/users/idaholab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idaholab/subscriptions","organizations_url":"https://api.github.com/users/idaholab/orgs","repos_url":"https://api.github.com/users/idaholab/repos","events_url":"https://api.github.com/users/idaholab/events{/privacy}","received_events_url":"https://api.github.com/users/idaholab/received_events","type":"Organization","site_admin":false},"repo":{"id":16851223,"name":"moose","full_name":"idaholab/moose","owner":{"login":"idaholab","id":3855370,"avatar_url":"https://avatars.githubusercontent.com/u/3855370?v=3","gravatar_id":"","url":"https://api.github.com/users/idaholab","html_url":"https://github.com/idaholab","followers_url":"https://api.github.com/users/idaholab/followers","following_url":"https://api.github.com/users/idaholab/following{/other_user}","gists_url":"https://api.github.com/users/idaholab/gists{/gist_id}","starred_url":"https://api.github.com/users/idaholab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idaholab/subscriptions","organizations_url":"https://api.github.com/users/idaholab/orgs","repos_url":"https://api.github.com/users/idaholab/repos","events_url":"https://api.github.com/users/idaholab/events{/privacy}","received_events_url":"https://api.github.com/users/idaholab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/idaholab/moose","description":"Multiphysics Object Oriented Simulation Environment","fork":false,"url":"https://api.github.com/repos/idaholab/moose","forks_url":"https://api.github.com/repos/idaholab/moose/forks","keys_url":"https://api.github.com/repos/idaholab/moose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idaholab/moose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idaholab/moose/teams","hooks_url":"https://api.github.com/repos/idaholab/moose/hooks","issue_events_url":"https://api.github.com/repos/idaholab/moose/issues/events{/number}","events_url":"https://api.github.com/repos/idaholab/moose/events","assignees_url":"https://api.github.com/repos/idaholab/moose/assignees{/user}","branches_url":"https://api.github.com/repos/idaholab/moose/branches{/branch}","tags_url":"https://api.github.com/repos/idaholab/moose/tags","blobs_url":"https://api.github.com/repos/idaholab/moose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idaholab/moose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idaholab/moose/git/refs{/sha}","trees_url":"https://api.github.com/repos/idaholab/moose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idaholab/moose/statuses/{sha}","languages_url":"https://api.github.com/repos/idaholab/moose/languages","stargazers_url":"https://api.github.com/repos/idaholab/moose/stargazers","contributors_url":"https://api.github.com/repos/idaholab/moose/contributors","subscribers_url":"https://api.github.com/repos/idaholab/moose/subscribers","subscription_url":"https://api.github.com/repos/idaholab/moose/subscription","commits_url":"https://api.github.com/repos/idaholab/moose/commits{/sha}","git_commits_url":"https://api.github.com/repos/idaholab/moose/git/commits{/sha}","comments_url":"https://api.github.com/repos/idaholab/moose/comments{/number}","issue_comment_url":"https://api.github.com/repos/idaholab/moose/issues/comments{/number}","contents_url":"https://api.github.com/repos/idaholab/moose/contents/{+path}","compare_url":"https://api.github.com/repos/idaholab/moose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idaholab/moose/merges","archive_url":"https://api.github.com/repos/idaholab/moose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idaholab/moose/downloads","issues_url":"https://api.github.com/repos/idaholab/moose/issues{/number}","pulls_url":"https://api.github.com/repos/idaholab/moose/pulls{/number}","milestones_url":"https://api.github.com/repos/idaholab/moose/milestones{/number}","notifications_url":"https://api.github.com/repos/idaholab/moose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idaholab/moose/labels{/name}","releases_url":"https://api.github.com/repos/idaholab/moose/releases{/id}","deployments_url":"https://api.github.com/repos/idaholab/moose/deployments","created_at":"2014-02-14T22:26:15Z","updated_at":"2016-07-04T01:33:01Z","pushed_at":"2016-07-06T20:55:00Z","git_url":"git://github.com/idaholab/moose.git","ssh_url":"git@github.com:idaholab/moose.git","clone_url":"https://github.com/idaholab/moose.git","svn_url":"https://github.com/idaholab/moose","homepage":"http://www.mooseframework.org","size":147619,"stargazers_count":163,"watchers_count":163,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":261,"mirror_url":null,"open_issues_count":643,"forks":261,"open_issues":643,"watchers":163,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/7282"},"html":{"href":"https://github.com/idaholab/moose/pull/7282"},"issue":{"href":"https://api.github.com/repos/idaholab/moose/issues/7282"},"comments":{"href":"https://api.github.com/repos/idaholab/moose/issues/7282/comments"},"review_comments":{"href":"https://api.github.com/repos/idaholab/moose/pulls/7282/comments"},"review_comment":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/idaholab/moose/pulls/7282/commits"},"statuses":{"href":"https://api.github.com/repos/idaholab/moose/statuses/14de3bef397d6ccb15d94be07c25b86024fcbf83"}}}}
{"actor":{"display_login":"FHilty"}}