{"action":"created","comment":{"url":"https://api.github.com/repos/idaholab/moose/pulls/comments/130704685","pull_request_review_id":53608103,"id":130704685,"diff_hunk":"@@ -0,0 +1,1106 @@\n+/****************************************************************/\n+/* MOOSE - Multiphysics Object Oriented Simulation Environment  */\n+/*                                                              */\n+/*          All contents are licensed under LGPL V2.1           */\n+/*             See LICENSE for full restrictions                */\n+/****************************************************************/\n+\n+#include \"MeshCut3DUserObject.h\"\n+\n+#include \"XFEMFuncs.h\"\n+#include \"MooseError.h\"\n+#include \"libmesh/string_to_enum.h\"\n+#include \"MooseMesh.h\"\n+#include \"libmesh/face_tri3.h\"\n+#include \"libmesh/edge_edge2.h\"\n+\n+template <>\n+InputParameters\n+validParams<MeshCut3DUserObject>()\n+{\n+  InputParameters params = validParams<GeometricCutUserObject>();\n+  params.addRequiredParam<std::string>(\"mesh_file\", \"Mesh file for XFEM geometric cuts\");\n+  params.addParam<Real>(\"size_control\", \"Criterion for refining elements while growing the crack\");\n+  params.addParam<unsigned int>(\"n_step_growth\", \"Number of steps for crack growth\");\n+  params.addClassDescription(\"Creates a UserObject for a mesh cutter in 3D problems\");\n+  return params;\n+}\n+\n+// currently, this code does not allow predefined crack growth\n+// all inital cracks have to be defined at t_start = t_end = 0\n+MeshCut3DUserObject::MeshCut3DUserObject(const InputParameters & parameters)\n+  : GeometricCutUserObject(parameters), _mesh(_subproblem.mesh())\n+{\n+  if (isParamValid(\"n_step_growth\"))\n+    _n_step_growth = getParam<unsigned int>(\"n_step_growth\");\n+  else\n+    _n_step_growth = 0;\n+\n+  if (_n_step_growth == 0)\n+    _grow = 0;\n+  else\n+    _grow = 1;\n+\n+  if (_grow && !isParamValid(\"size_control\"))\n+    mooseError(\"Crack growth needs size control\");\n+\n+  if (isParamValid(\"size_control\"))\n+    _size_control = getParam<Real>(\"size_control\");\n+\n+  std::string xfem_cut_mesh_file = getParam<std::string>(\"mesh_file\");\n+  _cut_mesh = libmesh_make_unique<ReplicatedMesh>(_communicator);\n+  _cut_mesh->read(xfem_cut_mesh_file);\n+\n+  // test element type\n+  auto elem_it = _cut_mesh->elements_begin();\n+  auto elem_end = _cut_mesh->elements_end();\n+  for (; elem_it != elem_end; ++elem_it)\n+  {\n+    Elem * cut_elem = *elem_it;\n+    unsigned int n_node = cut_elem->n_nodes();\n+    if (n_node != 3)\n+      mooseError(\"The input cut mesh should include tri elements only!\");\n+  }\n+\n+  // this is a test of the growth methods\n+  // will be moved to other places in a later version\n+  if (_grow)\n+  {\n+    _stop = 0;\n+\n+    findBoundaryNodes();\n+    findBoundaryEdges();\n+    sortBoundaryNodes();\n+    refineBoundary();\n+\n+    // visualize crack growth through an output file\n+    // will be updated to other formats, e.g. *.e in a later version\n+    std::ofstream myfile;\n+    myfile.open(\"mesh_grow.out\");\n+\n+    for (unsigned int i = 0; i < _n_step_growth; ++i)\n+    {\n+      findActiveBoundaryNodes();\n+\n+      if (_stop != 1)\n+      {\n+        findActiveBoundaryDirection();\n+        growFront();\n+        sortFrontNodes();\n+\n+        if (_inactive_boundary.size() != 0)\n+          findFrontIntersection();\n+\n+        refineFront();\n+        triangulation();\n+        join();\n+      }\n+\n+      myfile << _cut_mesh->n_nodes() << std::endl;\n+      myfile << _cut_mesh->n_elem() << std::endl;\n+      auto node_begin = _cut_mesh->nodes_begin();\n+      auto node_end = _cut_mesh->nodes_end();\n+      auto node_it = node_begin;\n+      unsigned int n = 0;\n+      for (; node_it != node_end; ++node_it)\n+      {\n+        Node * cutnode = *node_it;\n+        Point & this_point = *cutnode;\n+        myfile << this_point(0) << \" \" << this_point(1) << \" \" << this_point(2) << \" \" << std::endl;\n+      }\n+      auto elem_begin2 = _cut_mesh->elements_begin();\n+      auto elem_end2 = _cut_mesh->elements_end();\n+      auto elem_it2 = elem_begin2;\n+      n = 0;\n+      for (; elem_it2 != elem_end2; ++elem_it2)\n+      {\n+        Elem * cut_elem = *elem_it2;\n+        std::vector<unsigned int> tri;\n+        for (unsigned int i = 0; i < cut_elem->n_nodes(); ++i)\n+        {\n+          tri.push_back(cut_elem->node(i));\n+        }\n+        myfile << tri[0] << \" \" << tri[1] << \" \" << tri[2] << std::endl;\n+      }\n+    }\n+    myfile.close();\n+  }\n+}\n+\n+MeshCut3DUserObject::~MeshCut3DUserObject() {}","path":"modules/xfem/src/userobjects/MeshCut3DUserObject.C","position":130,"original_position":130,"commit_id":"a269fdc871f6e6bd2ef88517445757e582cedb0a","original_commit_id":"a269fdc871f6e6bd2ef88517445757e582cedb0a","user":{"login":"permcody","id":3036960,"avatar_url":"https://avatars2.githubusercontent.com/u/3036960?v=4","gravatar_id":"","url":"https://api.github.com/users/permcody","html_url":"https://github.com/permcody","followers_url":"https://api.github.com/users/permcody/followers","following_url":"https://api.github.com/users/permcody/following{/other_user}","gists_url":"https://api.github.com/users/permcody/gists{/gist_id}","starred_url":"https://api.github.com/users/permcody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/permcody/subscriptions","organizations_url":"https://api.github.com/users/permcody/orgs","repos_url":"https://api.github.com/users/permcody/repos","events_url":"https://api.github.com/users/permcody/events{/privacy}","received_events_url":"https://api.github.com/users/permcody/received_events","type":"User","site_admin":false},"body":"No need to define empty dtor in derived class - Remove.","created_at":"2017-08-01T19:29:01Z","updated_at":"2017-08-01T19:49:33Z","html_url":"https://github.com/idaholab/moose/pull/9585#discussion_r130704685","pull_request_url":"https://api.github.com/repos/idaholab/moose/pulls/9585","_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments/130704685"},"html":{"href":"https://github.com/idaholab/moose/pull/9585#discussion_r130704685"},"pull_request":{"href":"https://api.github.com/repos/idaholab/moose/pulls/9585"}}},"pull_request":{"url":"https://api.github.com/repos/idaholab/moose/pulls/9585","id":133149026,"html_url":"https://github.com/idaholab/moose/pull/9585","diff_url":"https://github.com/idaholab/moose/pull/9585.diff","patch_url":"https://github.com/idaholab/moose/pull/9585.patch","issue_url":"https://api.github.com/repos/idaholab/moose/issues/9585","number":9585,"state":"open","locked":false,"title":"A mesh-based cutter class with growth capability","user":{"login":"liuusu","id":29212430,"avatar_url":"https://avatars0.githubusercontent.com/u/29212430?v=4","gravatar_id":"","url":"https://api.github.com/users/liuusu","html_url":"https://github.com/liuusu","followers_url":"https://api.github.com/users/liuusu/followers","following_url":"https://api.github.com/users/liuusu/following{/other_user}","gists_url":"https://api.github.com/users/liuusu/gists{/gist_id}","starred_url":"https://api.github.com/users/liuusu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuusu/subscriptions","organizations_url":"https://api.github.com/users/liuusu/orgs","repos_url":"https://api.github.com/users/liuusu/repos","events_url":"https://api.github.com/users/liuusu/events{/privacy}","received_events_url":"https://api.github.com/users/liuusu/received_events","type":"User","site_admin":false},"body":"The new class has functions that (1) read in a mesh describing crack surfaces, (2) use the mesh to do initial cutting of 3D elements, and (3) grow the mesh based on prescribed velocities and directions. Two tests are added: (1) \"3d edge crack\" which duplicates results from an existing test that uses geometric cutter; and (2) \"crack growth\" which shows initial capability of crack growth functions.    \r\nRef #9584 ","created_at":"2017-07-31T00:19:58Z","updated_at":"2017-08-01T19:49:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"694977d36e6f59644b6a9572e48ca086296b0947","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/idaholab/moose/pulls/9585/commits","review_comments_url":"https://api.github.com/repos/idaholab/moose/pulls/9585/comments","review_comment_url":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/idaholab/moose/issues/9585/comments","statuses_url":"https://api.github.com/repos/idaholab/moose/statuses/a269fdc871f6e6bd2ef88517445757e582cedb0a","head":{"label":"liuusu:uo_mesh","ref":"uo_mesh","sha":"a269fdc871f6e6bd2ef88517445757e582cedb0a","user":{"login":"liuusu","id":29212430,"avatar_url":"https://avatars0.githubusercontent.com/u/29212430?v=4","gravatar_id":"","url":"https://api.github.com/users/liuusu","html_url":"https://github.com/liuusu","followers_url":"https://api.github.com/users/liuusu/followers","following_url":"https://api.github.com/users/liuusu/following{/other_user}","gists_url":"https://api.github.com/users/liuusu/gists{/gist_id}","starred_url":"https://api.github.com/users/liuusu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuusu/subscriptions","organizations_url":"https://api.github.com/users/liuusu/orgs","repos_url":"https://api.github.com/users/liuusu/repos","events_url":"https://api.github.com/users/liuusu/events{/privacy}","received_events_url":"https://api.github.com/users/liuusu/received_events","type":"User","site_admin":false},"repo":{"id":94800022,"name":"moose","full_name":"liuusu/moose","owner":{"login":"liuusu","id":29212430,"avatar_url":"https://avatars0.githubusercontent.com/u/29212430?v=4","gravatar_id":"","url":"https://api.github.com/users/liuusu","html_url":"https://github.com/liuusu","followers_url":"https://api.github.com/users/liuusu/followers","following_url":"https://api.github.com/users/liuusu/following{/other_user}","gists_url":"https://api.github.com/users/liuusu/gists{/gist_id}","starred_url":"https://api.github.com/users/liuusu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuusu/subscriptions","organizations_url":"https://api.github.com/users/liuusu/orgs","repos_url":"https://api.github.com/users/liuusu/repos","events_url":"https://api.github.com/users/liuusu/events{/privacy}","received_events_url":"https://api.github.com/users/liuusu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liuusu/moose","description":"Multiphysics Object Oriented Simulation Environment","fork":true,"url":"https://api.github.com/repos/liuusu/moose","forks_url":"https://api.github.com/repos/liuusu/moose/forks","keys_url":"https://api.github.com/repos/liuusu/moose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liuusu/moose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liuusu/moose/teams","hooks_url":"https://api.github.com/repos/liuusu/moose/hooks","issue_events_url":"https://api.github.com/repos/liuusu/moose/issues/events{/number}","events_url":"https://api.github.com/repos/liuusu/moose/events","assignees_url":"https://api.github.com/repos/liuusu/moose/assignees{/user}","branches_url":"https://api.github.com/repos/liuusu/moose/branches{/branch}","tags_url":"https://api.github.com/repos/liuusu/moose/tags","blobs_url":"https://api.github.com/repos/liuusu/moose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liuusu/moose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liuusu/moose/git/refs{/sha}","trees_url":"https://api.github.com/repos/liuusu/moose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liuusu/moose/statuses/{sha}","languages_url":"https://api.github.com/repos/liuusu/moose/languages","stargazers_url":"https://api.github.com/repos/liuusu/moose/stargazers","contributors_url":"https://api.github.com/repos/liuusu/moose/contributors","subscribers_url":"https://api.github.com/repos/liuusu/moose/subscribers","subscription_url":"https://api.github.com/repos/liuusu/moose/subscription","commits_url":"https://api.github.com/repos/liuusu/moose/commits{/sha}","git_commits_url":"https://api.github.com/repos/liuusu/moose/git/commits{/sha}","comments_url":"https://api.github.com/repos/liuusu/moose/comments{/number}","issue_comment_url":"https://api.github.com/repos/liuusu/moose/issues/comments{/number}","contents_url":"https://api.github.com/repos/liuusu/moose/contents/{+path}","compare_url":"https://api.github.com/repos/liuusu/moose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liuusu/moose/merges","archive_url":"https://api.github.com/repos/liuusu/moose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liuusu/moose/downloads","issues_url":"https://api.github.com/repos/liuusu/moose/issues{/number}","pulls_url":"https://api.github.com/repos/liuusu/moose/pulls{/number}","milestones_url":"https://api.github.com/repos/liuusu/moose/milestones{/number}","notifications_url":"https://api.github.com/repos/liuusu/moose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liuusu/moose/labels{/name}","releases_url":"https://api.github.com/repos/liuusu/moose/releases{/id}","deployments_url":"https://api.github.com/repos/liuusu/moose/deployments","created_at":"2017-06-19T16:55:26Z","updated_at":"2017-06-19T16:55:43Z","pushed_at":"2017-07-31T16:13:05Z","git_url":"git://github.com/liuusu/moose.git","ssh_url":"git@github.com:liuusu/moose.git","clone_url":"https://github.com/liuusu/moose.git","svn_url":"https://github.com/liuusu/moose","homepage":"http://www.mooseframework.org","size":197301,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"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":"1652c658f72b159f48728cb4f1eae3e45ddf0422","user":{"login":"idaholab","id":3855370,"avatar_url":"https://avatars0.githubusercontent.com/u/3855370?v=4","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://avatars0.githubusercontent.com/u/3855370?v=4","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":"2017-07-13T04:33:22Z","pushed_at":"2017-08-01T19:12:08Z","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":197085,"stargazers_count":225,"watchers_count":225,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":365,"mirror_url":null,"open_issues_count":718,"forks":365,"open_issues":718,"watchers":225,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/9585"},"html":{"href":"https://github.com/idaholab/moose/pull/9585"},"issue":{"href":"https://api.github.com/repos/idaholab/moose/issues/9585"},"comments":{"href":"https://api.github.com/repos/idaholab/moose/issues/9585/comments"},"review_comments":{"href":"https://api.github.com/repos/idaholab/moose/pulls/9585/comments"},"review_comment":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/idaholab/moose/pulls/9585/commits"},"statuses":{"href":"https://api.github.com/repos/idaholab/moose/statuses/a269fdc871f6e6bd2ef88517445757e582cedb0a"}}}}
{"actor":{"display_login":"permcody"}}