{"action":"created","issue":{"url":"https://api.github.com/repos/OPM/opm-upscaling/issues/153","labels_url":"https://api.github.com/repos/OPM/opm-upscaling/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/OPM/opm-upscaling/issues/153/comments","events_url":"https://api.github.com/repos/OPM/opm-upscaling/issues/153/events","html_url":"https://github.com/OPM/opm-upscaling/pull/153","id":92414685,"number":153,"title":"Refactor relperm upscaling apps","user":{"login":"akva2","id":2144327,"avatar_url":"https://avatars.githubusercontent.com/u/2144327?v=3","gravatar_id":"","url":"https://api.github.com/users/akva2","html_url":"https://github.com/akva2","followers_url":"https://api.github.com/users/akva2/followers","following_url":"https://api.github.com/users/akva2/following{/other_user}","gists_url":"https://api.github.com/users/akva2/gists{/gist_id}","starred_url":"https://api.github.com/users/akva2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akva2/subscriptions","organizations_url":"https://api.github.com/users/akva2/orgs","repos_url":"https://api.github.com/users/akva2/repos","events_url":"https://api.github.com/users/akva2/events{/privacy}","received_events_url":"https://api.github.com/users/akva2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-01T15:34:07Z","updated_at":"2015-09-14T09:00:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OPM/opm-upscaling/pulls/153","html_url":"https://github.com/OPM/opm-upscaling/pull/153","diff_url":"https://github.com/OPM/opm-upscaling/pull/153.diff","patch_url":"https://github.com/OPM/opm-upscaling/pull/153.patch"},"body":"Do not merge this PR yet!\r\n\r\n- it is not verified to not cause regressions\r\n- currently completely untested with MPI\r\n\r\nThis refactors the two relperm applications (main app and benchmark) in order to share code.\r\n- It adds a regression test for relperm upscaling\r\n- It fixes a bad bug in the benchmark where reference pressures were compared to reference pressures.\r\n- It removes some differences between the code in benchmark and main application related to surfaceTension scaling. Even though everything is linear in this factor, the hack in fa1f87c98d57f7b8cfbc93ae09a74bb5cdeb6cf1 is fugly (but it is not for me to say no to such things in other people's code).\r\n- It moves all error handling to exceptions.\r\n- It reduces cut-and-paste coding between application and benchmark\r\n- It refactors into functions making main() much more readable\r\n- It removes cut-and-paste coding for each phase (sigh)\r\n- It removes cut-and-paste coding for each component (double sigh!)\r\n- It hides private data\r\n- It updates the code to use more C++11 concepts and std::algorithm usage.\r\n\r\nI have done my very best to avoid regressions, I am not aware of any. But this needs to be tested heavily before we hit the green as these codes are in production.\r\n\r\nSome of the history here is of questionable value, as it reflects my refactoring strategies more than anything else."},"comment":{"url":"https://api.github.com/repos/OPM/opm-upscaling/issues/comments/140006760","html_url":"https://github.com/OPM/opm-upscaling/pull/153#issuecomment-140006760","issue_url":"https://api.github.com/repos/OPM/opm-upscaling/issues/153","id":140006760,"user":{"login":"akva2","id":2144327,"avatar_url":"https://avatars.githubusercontent.com/u/2144327?v=3","gravatar_id":"","url":"https://api.github.com/users/akva2","html_url":"https://github.com/akva2","followers_url":"https://api.github.com/users/akva2/followers","following_url":"https://api.github.com/users/akva2/following{/other_user}","gists_url":"https://api.github.com/users/akva2/gists{/gist_id}","starred_url":"https://api.github.com/users/akva2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akva2/subscriptions","organizations_url":"https://api.github.com/users/akva2/orgs","repos_url":"https://api.github.com/users/akva2/repos","events_url":"https://api.github.com/users/akva2/events{/privacy}","received_events_url":"https://api.github.com/users/akva2/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T09:00:02Z","updated_at":"2015-09-14T09:00:02Z","body":"yes.\n\ni have basically changed two apps doing\n\nblock1\nblock2\nblock3\netc\n\non their own into two apps both doing\nRelPermUtils::block1\nRelPermUtils::block2\nRelPermUtils::block3\netc\n\n"}}