{"action":"created","comment":{"url":"https://api.github.com/repos/idaholab/moose/pulls/comments/87413020","pull_request_review_id":8026640,"id":87413020,"diff_hunk":"@@ -77,58 +77,90 @@ ComputeReturnMappingStress::updateQpStress(RankTwoTensor & strain_increment,\n       << std::endl;\n   }\n \n-  // compute trial stress\n-  RankTwoTensor stress_last_iteration = _elasticity_tensor[_qp] * (strain_increment + _elastic_strain_old[_qp]);\n-\n   RankTwoTensor inelastic_strain_increment, elastic_strain_increment;\n   inelastic_strain_increment.zero();\n \n-  Real equivalent_delta_stress, first_equivalent_delta_stress;\n+  Real l2norm_delta_stress, first_l2norm_delta_stress;\n   unsigned int counter = 0;\n \n+  std::vector<RankTwoTensor> inelastic_strain_increment_new;\n+  inelastic_strain_increment_new.resize(_models.size());\n+\n+  for (unsigned i_rmm = 0; i_rmm < _models.size(); ++i_rmm)\n+    inelastic_strain_increment_new[i_rmm].zero();\n+\n+  RankTwoTensor stress_max, stress_min;\n+\n   do\n   {\n-    elastic_strain_increment = strain_increment;\n-    stress_new = _elasticity_tensor[_qp] * (elastic_strain_increment - inelastic_strain_increment + _elastic_strain_old[_qp]);\n-\n-    for (unsigned i_rmm =0; i_rmm < _models.size(); ++i_rmm)\n+    for (unsigned i_rmm = 0; i_rmm < _models.size(); ++i_rmm)\n     {\n       _models[i_rmm]->setQp(_qp);\n+\n+      elastic_strain_increment = strain_increment;\n+\n+      for (unsigned j_rmm = 0; j_rmm < _models.size(); ++j_rmm)\n+        if (i_rmm != j_rmm)\n+          elastic_strain_increment -= inelastic_strain_increment_new[j_rmm];\n+\n+      stress_new = _elasticity_tensor[_qp] * (elastic_strain_increment + _elastic_strain_old[_qp]);\n+\n       _models[i_rmm]->updateStress(elastic_strain_increment,\n-                                    inelastic_strain_increment,\n-                                    stress_new);\n+                                   inelastic_strain_increment,\n+                                   stress_new);\n+\n+      inelastic_strain_increment_new[i_rmm] = inelastic_strain_increment;\n+\n+      if (i_rmm == 0)\n+      {\n+        stress_max = stress_new;\n+        stress_min = stress_new;\n+      }\n+      else\n+      {\n+        for (unsigned int i = 0; i < LIBMESH_DIM; ++i)\n+        {\n+          for (unsigned int j = 0; j < LIBMESH_DIM; ++j)\n+          {\n+            if (stress_new(i,j) > stress_max(i,j))\n+              stress_max(i,j) = stress_new(i,j);\n+\n+            if (stress_min(i,j) > stress_new(i,j))","path":"modules/tensor_mechanics/src/materials/ComputeReturnMappingStress.C","position":62,"original_position":62,"commit_id":"a4fbe601e105e7522d4d237aeca093b04d4498e6","original_commit_id":"a4fbe601e105e7522d4d237aeca093b04d4498e6","user":{"login":"bwspenc","id":6609012,"avatar_url":"https://avatars.githubusercontent.com/u/6609012?v=3","gravatar_id":"","url":"https://api.github.com/users/bwspenc","html_url":"https://github.com/bwspenc","followers_url":"https://api.github.com/users/bwspenc/followers","following_url":"https://api.github.com/users/bwspenc/following{/other_user}","gists_url":"https://api.github.com/users/bwspenc/gists{/gist_id}","starred_url":"https://api.github.com/users/bwspenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwspenc/subscriptions","organizations_url":"https://api.github.com/users/bwspenc/orgs","repos_url":"https://api.github.com/users/bwspenc/repos","events_url":"https://api.github.com/users/bwspenc/events{/privacy}","received_events_url":"https://api.github.com/users/bwspenc/received_events","type":"User","site_admin":false},"body":"Minor thing:  Now that you're initializing these min/max stresses for the first rmm, you can change this line to:\r\n`else if (stress_new(i,j) < stress_min(i,j))`","created_at":"2016-11-10T15:11:22Z","updated_at":"2016-11-10T15:11:22Z","html_url":"https://github.com/idaholab/moose/pull/8034#discussion_r87413020","pull_request_url":"https://api.github.com/repos/idaholab/moose/pulls/8034","_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments/87413020"},"html":{"href":"https://github.com/idaholab/moose/pull/8034#discussion_r87413020"},"pull_request":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8034"}}},"pull_request":{"url":"https://api.github.com/repos/idaholab/moose/pulls/8034","id":92881627,"html_url":"https://github.com/idaholab/moose/pull/8034","diff_url":"https://github.com/idaholab/moose/pull/8034.diff","patch_url":"https://github.com/idaholab/moose/pull/8034.patch","issue_url":"https://api.github.com/repos/idaholab/moose/issues/8034","number":8034,"state":"open","locked":false,"title":"improve stress iteration scheme for combined creep/plasticity model ","user":{"login":"jiangwen84","id":11078681,"avatar_url":"https://avatars.githubusercontent.com/u/11078681?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangwen84","html_url":"https://github.com/jiangwen84","followers_url":"https://api.github.com/users/jiangwen84/followers","following_url":"https://api.github.com/users/jiangwen84/following{/other_user}","gists_url":"https://api.github.com/users/jiangwen84/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangwen84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangwen84/subscriptions","organizations_url":"https://api.github.com/users/jiangwen84/orgs","repos_url":"https://api.github.com/users/jiangwen84/repos","events_url":"https://api.github.com/users/jiangwen84/events{/privacy}","received_events_url":"https://api.github.com/users/jiangwen84/received_events","type":"User","site_admin":false},"body":"Improve stress iteration scheme for combined creep/plasticity model.\r\n\r\nRegold one test.\r\n\r\nRef #8032","created_at":"2016-11-08T23:37:29Z","updated_at":"2016-11-10T15:20:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd566cdf06848caa3073f7e975619a35fb8bea54","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/idaholab/moose/pulls/8034/commits","review_comments_url":"https://api.github.com/repos/idaholab/moose/pulls/8034/comments","review_comment_url":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/idaholab/moose/issues/8034/comments","statuses_url":"https://api.github.com/repos/idaholab/moose/statuses/a4fbe601e105e7522d4d237aeca093b04d4498e6","head":{"label":"jiangwen84:return_mapping","ref":"return_mapping","sha":"a4fbe601e105e7522d4d237aeca093b04d4498e6","user":{"login":"jiangwen84","id":11078681,"avatar_url":"https://avatars.githubusercontent.com/u/11078681?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangwen84","html_url":"https://github.com/jiangwen84","followers_url":"https://api.github.com/users/jiangwen84/followers","following_url":"https://api.github.com/users/jiangwen84/following{/other_user}","gists_url":"https://api.github.com/users/jiangwen84/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangwen84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangwen84/subscriptions","organizations_url":"https://api.github.com/users/jiangwen84/orgs","repos_url":"https://api.github.com/users/jiangwen84/repos","events_url":"https://api.github.com/users/jiangwen84/events{/privacy}","received_events_url":"https://api.github.com/users/jiangwen84/received_events","type":"User","site_admin":false},"repo":{"id":31029557,"name":"moose","full_name":"jiangwen84/moose","owner":{"login":"jiangwen84","id":11078681,"avatar_url":"https://avatars.githubusercontent.com/u/11078681?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangwen84","html_url":"https://github.com/jiangwen84","followers_url":"https://api.github.com/users/jiangwen84/followers","following_url":"https://api.github.com/users/jiangwen84/following{/other_user}","gists_url":"https://api.github.com/users/jiangwen84/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangwen84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangwen84/subscriptions","organizations_url":"https://api.github.com/users/jiangwen84/orgs","repos_url":"https://api.github.com/users/jiangwen84/repos","events_url":"https://api.github.com/users/jiangwen84/events{/privacy}","received_events_url":"https://api.github.com/users/jiangwen84/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jiangwen84/moose","description":"Multiphysics Object Oriented Simulation Environment","fork":true,"url":"https://api.github.com/repos/jiangwen84/moose","forks_url":"https://api.github.com/repos/jiangwen84/moose/forks","keys_url":"https://api.github.com/repos/jiangwen84/moose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jiangwen84/moose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jiangwen84/moose/teams","hooks_url":"https://api.github.com/repos/jiangwen84/moose/hooks","issue_events_url":"https://api.github.com/repos/jiangwen84/moose/issues/events{/number}","events_url":"https://api.github.com/repos/jiangwen84/moose/events","assignees_url":"https://api.github.com/repos/jiangwen84/moose/assignees{/user}","branches_url":"https://api.github.com/repos/jiangwen84/moose/branches{/branch}","tags_url":"https://api.github.com/repos/jiangwen84/moose/tags","blobs_url":"https://api.github.com/repos/jiangwen84/moose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jiangwen84/moose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jiangwen84/moose/git/refs{/sha}","trees_url":"https://api.github.com/repos/jiangwen84/moose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jiangwen84/moose/statuses/{sha}","languages_url":"https://api.github.com/repos/jiangwen84/moose/languages","stargazers_url":"https://api.github.com/repos/jiangwen84/moose/stargazers","contributors_url":"https://api.github.com/repos/jiangwen84/moose/contributors","subscribers_url":"https://api.github.com/repos/jiangwen84/moose/subscribers","subscription_url":"https://api.github.com/repos/jiangwen84/moose/subscription","commits_url":"https://api.github.com/repos/jiangwen84/moose/commits{/sha}","git_commits_url":"https://api.github.com/repos/jiangwen84/moose/git/commits{/sha}","comments_url":"https://api.github.com/repos/jiangwen84/moose/comments{/number}","issue_comment_url":"https://api.github.com/repos/jiangwen84/moose/issues/comments{/number}","contents_url":"https://api.github.com/repos/jiangwen84/moose/contents/{+path}","compare_url":"https://api.github.com/repos/jiangwen84/moose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jiangwen84/moose/merges","archive_url":"https://api.github.com/repos/jiangwen84/moose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jiangwen84/moose/downloads","issues_url":"https://api.github.com/repos/jiangwen84/moose/issues{/number}","pulls_url":"https://api.github.com/repos/jiangwen84/moose/pulls{/number}","milestones_url":"https://api.github.com/repos/jiangwen84/moose/milestones{/number}","notifications_url":"https://api.github.com/repos/jiangwen84/moose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jiangwen84/moose/labels{/name}","releases_url":"https://api.github.com/repos/jiangwen84/moose/releases{/id}","deployments_url":"https://api.github.com/repos/jiangwen84/moose/deployments","created_at":"2015-02-19T18:20:52Z","updated_at":"2016-01-25T04:34:17Z","pushed_at":"2016-11-10T00:44:56Z","git_url":"git://github.com/jiangwen84/moose.git","ssh_url":"git@github.com:jiangwen84/moose.git","clone_url":"https://github.com/jiangwen84/moose.git","svn_url":"https://github.com/jiangwen84/moose","homepage":null,"size":150526,"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":"801fcbbf0f81e3f947d880c2246270bff746b86d","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-11-09T09:12:41Z","pushed_at":"2016-11-10T15:02:07Z","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":167007,"stargazers_count":177,"watchers_count":177,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":294,"mirror_url":null,"open_issues_count":716,"forks":294,"open_issues":716,"watchers":177,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8034"},"html":{"href":"https://github.com/idaholab/moose/pull/8034"},"issue":{"href":"https://api.github.com/repos/idaholab/moose/issues/8034"},"comments":{"href":"https://api.github.com/repos/idaholab/moose/issues/8034/comments"},"review_comments":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8034/comments"},"review_comment":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8034/commits"},"statuses":{"href":"https://api.github.com/repos/idaholab/moose/statuses/a4fbe601e105e7522d4d237aeca093b04d4498e6"}}}}
{"actor":{"display_login":"bwspenc"}}