{"action":"created","comment":{"url":"https://api.github.com/repos/ufz/ogs5/pulls/comments/206811773","pull_request_review_id":142294800,"id":206811773,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjgxMTc3Mw==","diff_hunk":"@@ -753,55 +731,37 @@ void CFiniteElementVec::ComputeStrain(const int ip)\n  **************************************************************************/\n double CFiniteElementVec::CalDensity()\n {\n-\tdouble rho;\n-\t// OK_MFP\n-\t//--------------------------------------------------------------------\n-\t// MFP fluid properties\n-\tdouble density_fluid = 0.0;\n-\tdouble porosity = 0.0;\n-\t// double p_g = 0.0;\n-\tdouble Sw = 0.0;\n-\tint no_phases = (int)mfp_vector.size();\n-\tint i = 0, phase = 0;\n-\n-\trho = 0.0;\n \tif (F_Flag)\n \t{\n-\t\tif ((no_phases > 0) && (no_phases > phase))\n-\t\t\tdensity_fluid = m_mfp->Density();\n-\n-\t\t// OK_MMP\n \t\t//--------------------------------------------------------------------\n-\t\t// MMP medium properties\n-\t\tporosity = m_mmp->Porosity(this);\n \t\t// Assume solid density is constant. (*smat->data_Density)(0)\n \t\tif (smat->Density() > 0.0)\n \t\t{\n-\t\t\tSw = 1.0; // JT, should be 1.0, unless multiphase (calculate below) (if unsaturated, fluid density would be\n-\t\t\t          // negligible... so still works)\n-\t\t\tif (Flow_Type > 0 && Flow_Type != 10)\n-\t\t\t{\n-\t\t\t\tSw = 0.; // WW\n-\t\t\t\tfor (i = 0; i < nnodes; i++)\n-\t\t\t\t\tSw += shapefct[i] * _nodal_S[i];\n-\t\t\t}\n-\t\t\trho = (1. - porosity) * fabs(smat->Density()) + porosity * Sw * density_fluid;\n+\t\t\tconst double density_fluid = (mfp_vector.empty()) ?  m_mfp->Density() : 0.0;\n+\t\t\tconst double porosity = m_mmp->Porosity(this);\n \n-\t\t\tif (Flow_Type == 2 || Flow_Type == 3)\n+\t\t\tdouble rho = (1. - porosity) * fabs(smat->Density())\n+\t\t\t\t+ porosity * _wettingS * density_fluid;\n+\n+\t\t\tif (_flow_type == FiniteElement::MULTI_PHASE_FLOW\n+\t\t\t\t|| _flow_type == FiniteElement::PS_GLOBAL)\n \t\t\t{\n-\t\t\t\tCFluidProperties* GasProp;\n-\t\t\t\tGasProp = MFPGet(\"GAS\");\n-\t\t\t\trho += porosity * (1.0 - Sw) * GasProp->Density();\n+\t\t\t\tCFluidProperties* const GasProp = MFPGet(\"GAS\");\n+\t\t\t\trho += porosity * (1.0 - _wettingS) * GasProp->Density();\n \t\t\t}\n+\t\t\treturn rho;\n \t\t}\n \t\telse\n-\t\t\trho = 0.0;\n+\t\t\treturn 0.0;\n \t}\n-\telse\n-\t    // If negative value is given in the .msp file, gravity by solid is skipped\n-\t    if (smat->Density() > 0.0)\n-\t\trho = smat->Density();\n-\treturn rho;\n+\n+    // If negative value is given in the .msp file, gravity by solid is skipped\n+    if (smat->Density() > 0.0)","path":"FEM/fem_ele_vec.cpp","position":null,"original_position":175,"commit_id":"c544b6bf9e26f247c4fd0a0f3ae19728ee519dff","original_commit_id":"2e3019a6044f72f08a36e55dd977ce9282b4ed46","user":{"login":"wenqing","id":1343839,"node_id":"MDQ6VXNlcjEzNDM4Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1343839?v=4","gravatar_id":"","url":"https://api.github.com/users/wenqing","html_url":"https://github.com/wenqing","followers_url":"https://api.github.com/users/wenqing/followers","following_url":"https://api.github.com/users/wenqing/following{/other_user}","gists_url":"https://api.github.com/users/wenqing/gists{/gist_id}","starred_url":"https://api.github.com/users/wenqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenqing/subscriptions","organizations_url":"https://api.github.com/users/wenqing/orgs","repos_url":"https://api.github.com/users/wenqing/repos","events_url":"https://api.github.com/users/wenqing/events{/privacy}","received_events_url":"https://api.github.com/users/wenqing/received_events","type":"User","site_admin":false},"body":"Corrected.","created_at":"2018-08-01T09:27:59Z","updated_at":"2018-08-01T09:27:59Z","html_url":"https://github.com/ufz/ogs5/pull/105#discussion_r206811773","pull_request_url":"https://api.github.com/repos/ufz/ogs5/pulls/105","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ufz/ogs5/pulls/comments/206811773"},"html":{"href":"https://github.com/ufz/ogs5/pull/105#discussion_r206811773"},"pull_request":{"href":"https://api.github.com/repos/ufz/ogs5/pulls/105"}},"in_reply_to_id":201525057},"pull_request":{"url":"https://api.github.com/repos/ufz/ogs5/pulls/105","id":199241746,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MjQxNzQ2","html_url":"https://github.com/ufz/ogs5/pull/105","diff_url":"https://github.com/ufz/ogs5/pull/105.diff","patch_url":"https://github.com/ufz/ogs5/pull/105.patch","issue_url":"https://api.github.com/repos/ufz/ogs5/issues/105","number":105,"state":"open","locked":false,"title":"Improvment and bugfixing in CFiniteElementVec","user":{"login":"wenqing","id":1343839,"node_id":"MDQ6VXNlcjEzNDM4Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1343839?v=4","gravatar_id":"","url":"https://api.github.com/users/wenqing","html_url":"https://github.com/wenqing","followers_url":"https://api.github.com/users/wenqing/followers","following_url":"https://api.github.com/users/wenqing/following{/other_user}","gists_url":"https://api.github.com/users/wenqing/gists{/gist_id}","starred_url":"https://api.github.com/users/wenqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenqing/subscriptions","organizations_url":"https://api.github.com/users/wenqing/orgs","repos_url":"https://api.github.com/users/wenqing/repos","events_url":"https://api.github.com/users/wenqing/events{/privacy}","received_events_url":"https://api.github.com/users/wenqing/received_events","type":"User","site_admin":false},"body":"This PR improves  CFiniteElementVec, and it contains\r\n1) removed the negative value option of the Biot's constant.\r\n2) in the assembly of the pressure coupling related RHS and matrix,\r\n    *  replaced the element constant saturation with node saturations,\r\n    *  changed the computation of pressure coupled matrix for the staggered scheme for H2M, and fixed a bug for the monolithic scheme of H2M\r\n    * removed the restriction of  pore pressure to be positive in the total stress calculation.\r\n3) fixed the excavation conditions for the time stepping excavation model.\r\n4) replaced `int CFiniteElementVec::Flow_Type``with an enum variable.\r\n5) made some variable declarations local.\r\n6) removed some repeated or unused source code.\r\n\r\nThe changes in 2) improves the computation solutions of the benchmarks for the THM coupled processes. Therefore the reference results of the affected benchmarks have to be updated too.","created_at":"2018-07-04T12:56:54Z","updated_at":"2018-08-01T09:27:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e361d67196b4a0448814671df28857f986d8a55b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ufz/ogs5/pulls/105/commits","review_comments_url":"https://api.github.com/repos/ufz/ogs5/pulls/105/comments","review_comment_url":"https://api.github.com/repos/ufz/ogs5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ufz/ogs5/issues/105/comments","statuses_url":"https://api.github.com/repos/ufz/ogs5/statuses/c544b6bf9e26f247c4fd0a0f3ae19728ee519dff","head":{"label":"wenqing:improveLocalAssemblerM","ref":"improveLocalAssemblerM","sha":"c544b6bf9e26f247c4fd0a0f3ae19728ee519dff","user":{"login":"wenqing","id":1343839,"node_id":"MDQ6VXNlcjEzNDM4Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1343839?v=4","gravatar_id":"","url":"https://api.github.com/users/wenqing","html_url":"https://github.com/wenqing","followers_url":"https://api.github.com/users/wenqing/followers","following_url":"https://api.github.com/users/wenqing/following{/other_user}","gists_url":"https://api.github.com/users/wenqing/gists{/gist_id}","starred_url":"https://api.github.com/users/wenqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenqing/subscriptions","organizations_url":"https://api.github.com/users/wenqing/orgs","repos_url":"https://api.github.com/users/wenqing/repos","events_url":"https://api.github.com/users/wenqing/events{/privacy}","received_events_url":"https://api.github.com/users/wenqing/received_events","type":"User","site_admin":false},"repo":{"id":50520335,"node_id":"MDEwOlJlcG9zaXRvcnk1MDUyMDMzNQ==","name":"ogs5","full_name":"wenqing/ogs5","owner":{"login":"wenqing","id":1343839,"node_id":"MDQ6VXNlcjEzNDM4Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1343839?v=4","gravatar_id":"","url":"https://api.github.com/users/wenqing","html_url":"https://github.com/wenqing","followers_url":"https://api.github.com/users/wenqing/followers","following_url":"https://api.github.com/users/wenqing/following{/other_user}","gists_url":"https://api.github.com/users/wenqing/gists{/gist_id}","starred_url":"https://api.github.com/users/wenqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenqing/subscriptions","organizations_url":"https://api.github.com/users/wenqing/orgs","repos_url":"https://api.github.com/users/wenqing/repos","events_url":"https://api.github.com/users/wenqing/events{/privacy}","received_events_url":"https://api.github.com/users/wenqing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wenqing/ogs5","description":"Official repository of the OpenGeoSys THM/C simulator","fork":true,"url":"https://api.github.com/repos/wenqing/ogs5","forks_url":"https://api.github.com/repos/wenqing/ogs5/forks","keys_url":"https://api.github.com/repos/wenqing/ogs5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wenqing/ogs5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wenqing/ogs5/teams","hooks_url":"https://api.github.com/repos/wenqing/ogs5/hooks","issue_events_url":"https://api.github.com/repos/wenqing/ogs5/issues/events{/number}","events_url":"https://api.github.com/repos/wenqing/ogs5/events","assignees_url":"https://api.github.com/repos/wenqing/ogs5/assignees{/user}","branches_url":"https://api.github.com/repos/wenqing/ogs5/branches{/branch}","tags_url":"https://api.github.com/repos/wenqing/ogs5/tags","blobs_url":"https://api.github.com/repos/wenqing/ogs5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wenqing/ogs5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wenqing/ogs5/git/refs{/sha}","trees_url":"https://api.github.com/repos/wenqing/ogs5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wenqing/ogs5/statuses/{sha}","languages_url":"https://api.github.com/repos/wenqing/ogs5/languages","stargazers_url":"https://api.github.com/repos/wenqing/ogs5/stargazers","contributors_url":"https://api.github.com/repos/wenqing/ogs5/contributors","subscribers_url":"https://api.github.com/repos/wenqing/ogs5/subscribers","subscription_url":"https://api.github.com/repos/wenqing/ogs5/subscription","commits_url":"https://api.github.com/repos/wenqing/ogs5/commits{/sha}","git_commits_url":"https://api.github.com/repos/wenqing/ogs5/git/commits{/sha}","comments_url":"https://api.github.com/repos/wenqing/ogs5/comments{/number}","issue_comment_url":"https://api.github.com/repos/wenqing/ogs5/issues/comments{/number}","contents_url":"https://api.github.com/repos/wenqing/ogs5/contents/{+path}","compare_url":"https://api.github.com/repos/wenqing/ogs5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wenqing/ogs5/merges","archive_url":"https://api.github.com/repos/wenqing/ogs5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wenqing/ogs5/downloads","issues_url":"https://api.github.com/repos/wenqing/ogs5/issues{/number}","pulls_url":"https://api.github.com/repos/wenqing/ogs5/pulls{/number}","milestones_url":"https://api.github.com/repos/wenqing/ogs5/milestones{/number}","notifications_url":"https://api.github.com/repos/wenqing/ogs5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wenqing/ogs5/labels{/name}","releases_url":"https://api.github.com/repos/wenqing/ogs5/releases{/id}","deployments_url":"https://api.github.com/repos/wenqing/ogs5/deployments","created_at":"2016-01-27T16:20:38Z","updated_at":"2018-06-19T08:26:55Z","pushed_at":"2018-08-01T09:27:15Z","git_url":"git://github.com/wenqing/ogs5.git","ssh_url":"git@github.com:wenqing/ogs5.git","clone_url":"https://github.com/wenqing/ogs5.git","svn_url":"https://github.com/wenqing/ogs5","homepage":"http://www.opengeosys.org","size":7793,"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":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ufz:master","ref":"master","sha":"b979ad9ab39df6bd25b021a7277b787fef102da9","user":{"login":"ufz","id":767517,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NzUxNw==","avatar_url":"https://avatars3.githubusercontent.com/u/767517?v=4","gravatar_id":"","url":"https://api.github.com/users/ufz","html_url":"https://github.com/ufz","followers_url":"https://api.github.com/users/ufz/followers","following_url":"https://api.github.com/users/ufz/following{/other_user}","gists_url":"https://api.github.com/users/ufz/gists{/gist_id}","starred_url":"https://api.github.com/users/ufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufz/subscriptions","organizations_url":"https://api.github.com/users/ufz/orgs","repos_url":"https://api.github.com/users/ufz/repos","events_url":"https://api.github.com/users/ufz/events{/privacy}","received_events_url":"https://api.github.com/users/ufz/received_events","type":"Organization","site_admin":false},"repo":{"id":41413218,"node_id":"MDEwOlJlcG9zaXRvcnk0MTQxMzIxOA==","name":"ogs5","full_name":"ufz/ogs5","owner":{"login":"ufz","id":767517,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NzUxNw==","avatar_url":"https://avatars3.githubusercontent.com/u/767517?v=4","gravatar_id":"","url":"https://api.github.com/users/ufz","html_url":"https://github.com/ufz","followers_url":"https://api.github.com/users/ufz/followers","following_url":"https://api.github.com/users/ufz/following{/other_user}","gists_url":"https://api.github.com/users/ufz/gists{/gist_id}","starred_url":"https://api.github.com/users/ufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufz/subscriptions","organizations_url":"https://api.github.com/users/ufz/orgs","repos_url":"https://api.github.com/users/ufz/repos","events_url":"https://api.github.com/users/ufz/events{/privacy}","received_events_url":"https://api.github.com/users/ufz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ufz/ogs5","description":"OpenGeoSys THM/C simulator version 5","fork":false,"url":"https://api.github.com/repos/ufz/ogs5","forks_url":"https://api.github.com/repos/ufz/ogs5/forks","keys_url":"https://api.github.com/repos/ufz/ogs5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ufz/ogs5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ufz/ogs5/teams","hooks_url":"https://api.github.com/repos/ufz/ogs5/hooks","issue_events_url":"https://api.github.com/repos/ufz/ogs5/issues/events{/number}","events_url":"https://api.github.com/repos/ufz/ogs5/events","assignees_url":"https://api.github.com/repos/ufz/ogs5/assignees{/user}","branches_url":"https://api.github.com/repos/ufz/ogs5/branches{/branch}","tags_url":"https://api.github.com/repos/ufz/ogs5/tags","blobs_url":"https://api.github.com/repos/ufz/ogs5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ufz/ogs5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ufz/ogs5/git/refs{/sha}","trees_url":"https://api.github.com/repos/ufz/ogs5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ufz/ogs5/statuses/{sha}","languages_url":"https://api.github.com/repos/ufz/ogs5/languages","stargazers_url":"https://api.github.com/repos/ufz/ogs5/stargazers","contributors_url":"https://api.github.com/repos/ufz/ogs5/contributors","subscribers_url":"https://api.github.com/repos/ufz/ogs5/subscribers","subscription_url":"https://api.github.com/repos/ufz/ogs5/subscription","commits_url":"https://api.github.com/repos/ufz/ogs5/commits{/sha}","git_commits_url":"https://api.github.com/repos/ufz/ogs5/git/commits{/sha}","comments_url":"https://api.github.com/repos/ufz/ogs5/comments{/number}","issue_comment_url":"https://api.github.com/repos/ufz/ogs5/issues/comments{/number}","contents_url":"https://api.github.com/repos/ufz/ogs5/contents/{+path}","compare_url":"https://api.github.com/repos/ufz/ogs5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ufz/ogs5/merges","archive_url":"https://api.github.com/repos/ufz/ogs5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ufz/ogs5/downloads","issues_url":"https://api.github.com/repos/ufz/ogs5/issues{/number}","pulls_url":"https://api.github.com/repos/ufz/ogs5/pulls{/number}","milestones_url":"https://api.github.com/repos/ufz/ogs5/milestones{/number}","notifications_url":"https://api.github.com/repos/ufz/ogs5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ufz/ogs5/labels{/name}","releases_url":"https://api.github.com/repos/ufz/ogs5/releases{/id}","deployments_url":"https://api.github.com/repos/ufz/ogs5/deployments","created_at":"2015-08-26T08:13:48Z","updated_at":"2018-07-31T18:55:44Z","pushed_at":"2018-08-01T09:27:16Z","git_url":"git://github.com/ufz/ogs5.git","ssh_url":"git@github.com:ufz/ogs5.git","clone_url":"https://github.com/ufz/ogs5.git","svn_url":"https://github.com/ufz/ogs5","homepage":"https://www.opengeosys.org/ogs-5","size":7179,"stargazers_count":14,"watchers_count":14,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":76,"open_issues":16,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ufz/ogs5/pulls/105"},"html":{"href":"https://github.com/ufz/ogs5/pull/105"},"issue":{"href":"https://api.github.com/repos/ufz/ogs5/issues/105"},"comments":{"href":"https://api.github.com/repos/ufz/ogs5/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/ufz/ogs5/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/ufz/ogs5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ufz/ogs5/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/ufz/ogs5/statuses/c544b6bf9e26f247c4fd0a0f3ae19728ee519dff"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"wenqing"}}