{"action":"opened","number":561,"pull_request":{"url":"https://api.github.com/repos/OPM/opm-autodiff/pulls/561","id":54100747,"html_url":"https://github.com/OPM/opm-autodiff/pull/561","diff_url":"https://github.com/OPM/opm-autodiff/pull/561.diff","patch_url":"https://github.com/OPM/opm-autodiff/pull/561.patch","issue_url":"https://api.github.com/repos/OPM/opm-autodiff/issues/561","number":561,"state":"open","locked":false,"title":"Refactor main functions of all Flow variants.","user":{"login":"atgeirr","id":1876621,"avatar_url":"https://avatars.githubusercontent.com/u/1876621?v=3","gravatar_id":"","url":"https://api.github.com/users/atgeirr","html_url":"https://github.com/atgeirr","followers_url":"https://api.github.com/users/atgeirr/followers","following_url":"https://api.github.com/users/atgeirr/following{/other_user}","gists_url":"https://api.github.com/users/atgeirr/gists{/gist_id}","starred_url":"https://api.github.com/users/atgeirr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atgeirr/subscriptions","organizations_url":"https://api.github.com/users/atgeirr/orgs","repos_url":"https://api.github.com/users/atgeirr/repos","events_url":"https://api.github.com/users/atgeirr/events{/privacy}","received_events_url":"https://api.github.com/users/atgeirr/received_events","type":"User","site_admin":false},"body":"With this PR, I consider the refactoring of the main functions complete for now. Main points are:\r\n - There is a new class FlowMain, the flowMain() function is now FlowMain::execute().\r\n - The content is split into many smaller functions instead of a single 350-line method.\r\n - FlowMain is a template, using the Curiously Recurring Template Pattern (CRTP) to support polymorphism.\r\n - Flow-polymer and Flow-solvent use this, overriding a few of the methods to provide special property classes etc.\r\n\r\nAn intentional side effect of this is that some minor options that were unavailable in Flow-Solvent or Flow-Polymer (or behaved differently) are now available universally. One could argue that the code in this class (or classes) should be part of the Simulator classes instead, but that was impractical as a first step. It could be considered a target for further refactoring.\r\n\r\nThe PR should see some more testing before merging. I'll report testing results as they are complete, but expect identical results to previous ones for flow. For the polymer and solvent simulators there may be minor differences related to default options used.\r\n","created_at":"2015-12-18T13:11:05Z","updated_at":"2015-12-18T13:11:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OPM/opm-autodiff/pulls/561/commits","review_comments_url":"https://api.github.com/repos/OPM/opm-autodiff/pulls/561/comments","review_comment_url":"https://api.github.com/repos/OPM/opm-autodiff/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OPM/opm-autodiff/issues/561/comments","statuses_url":"https://api.github.com/repos/OPM/opm-autodiff/statuses/bfcbd094884e26bbf1b095823083b094049cb39a","head":{"label":"atgeirr:refactor-extended-mains","ref":"refactor-extended-mains","sha":"bfcbd094884e26bbf1b095823083b094049cb39a","user":{"login":"atgeirr","id":1876621,"avatar_url":"https://avatars.githubusercontent.com/u/1876621?v=3","gravatar_id":"","url":"https://api.github.com/users/atgeirr","html_url":"https://github.com/atgeirr","followers_url":"https://api.github.com/users/atgeirr/followers","following_url":"https://api.github.com/users/atgeirr/following{/other_user}","gists_url":"https://api.github.com/users/atgeirr/gists{/gist_id}","starred_url":"https://api.github.com/users/atgeirr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atgeirr/subscriptions","organizations_url":"https://api.github.com/users/atgeirr/orgs","repos_url":"https://api.github.com/users/atgeirr/repos","events_url":"https://api.github.com/users/atgeirr/events{/privacy}","received_events_url":"https://api.github.com/users/atgeirr/received_events","type":"User","site_admin":false},"repo":{"id":10097592,"name":"opm-autodiff","full_name":"atgeirr/opm-autodiff","owner":{"login":"atgeirr","id":1876621,"avatar_url":"https://avatars.githubusercontent.com/u/1876621?v=3","gravatar_id":"","url":"https://api.github.com/users/atgeirr","html_url":"https://github.com/atgeirr","followers_url":"https://api.github.com/users/atgeirr/followers","following_url":"https://api.github.com/users/atgeirr/following{/other_user}","gists_url":"https://api.github.com/users/atgeirr/gists{/gist_id}","starred_url":"https://api.github.com/users/atgeirr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atgeirr/subscriptions","organizations_url":"https://api.github.com/users/atgeirr/orgs","repos_url":"https://api.github.com/users/atgeirr/repos","events_url":"https://api.github.com/users/atgeirr/events{/privacy}","received_events_url":"https://api.github.com/users/atgeirr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atgeirr/opm-autodiff","description":"Utilities for automatic differentiation and simulators based on AD.","fork":true,"url":"https://api.github.com/repos/atgeirr/opm-autodiff","forks_url":"https://api.github.com/repos/atgeirr/opm-autodiff/forks","keys_url":"https://api.github.com/repos/atgeirr/opm-autodiff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atgeirr/opm-autodiff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atgeirr/opm-autodiff/teams","hooks_url":"https://api.github.com/repos/atgeirr/opm-autodiff/hooks","issue_events_url":"https://api.github.com/repos/atgeirr/opm-autodiff/issues/events{/number}","events_url":"https://api.github.com/repos/atgeirr/opm-autodiff/events","assignees_url":"https://api.github.com/repos/atgeirr/opm-autodiff/assignees{/user}","branches_url":"https://api.github.com/repos/atgeirr/opm-autodiff/branches{/branch}","tags_url":"https://api.github.com/repos/atgeirr/opm-autodiff/tags","blobs_url":"https://api.github.com/repos/atgeirr/opm-autodiff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atgeirr/opm-autodiff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atgeirr/opm-autodiff/git/refs{/sha}","trees_url":"https://api.github.com/repos/atgeirr/opm-autodiff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atgeirr/opm-autodiff/statuses/{sha}","languages_url":"https://api.github.com/repos/atgeirr/opm-autodiff/languages","stargazers_url":"https://api.github.com/repos/atgeirr/opm-autodiff/stargazers","contributors_url":"https://api.github.com/repos/atgeirr/opm-autodiff/contributors","subscribers_url":"https://api.github.com/repos/atgeirr/opm-autodiff/subscribers","subscription_url":"https://api.github.com/repos/atgeirr/opm-autodiff/subscription","commits_url":"https://api.github.com/repos/atgeirr/opm-autodiff/commits{/sha}","git_commits_url":"https://api.github.com/repos/atgeirr/opm-autodiff/git/commits{/sha}","comments_url":"https://api.github.com/repos/atgeirr/opm-autodiff/comments{/number}","issue_comment_url":"https://api.github.com/repos/atgeirr/opm-autodiff/issues/comments{/number}","contents_url":"https://api.github.com/repos/atgeirr/opm-autodiff/contents/{+path}","compare_url":"https://api.github.com/repos/atgeirr/opm-autodiff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atgeirr/opm-autodiff/merges","archive_url":"https://api.github.com/repos/atgeirr/opm-autodiff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atgeirr/opm-autodiff/downloads","issues_url":"https://api.github.com/repos/atgeirr/opm-autodiff/issues{/number}","pulls_url":"https://api.github.com/repos/atgeirr/opm-autodiff/pulls{/number}","milestones_url":"https://api.github.com/repos/atgeirr/opm-autodiff/milestones{/number}","notifications_url":"https://api.github.com/repos/atgeirr/opm-autodiff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atgeirr/opm-autodiff/labels{/name}","releases_url":"https://api.github.com/repos/atgeirr/opm-autodiff/releases{/id}","created_at":"2013-05-16T09:01:36Z","updated_at":"2015-04-13T09:15:00Z","pushed_at":"2015-12-18T12:58:32Z","git_url":"git://github.com/atgeirr/opm-autodiff.git","ssh_url":"git@github.com:atgeirr/opm-autodiff.git","clone_url":"https://github.com/atgeirr/opm-autodiff.git","svn_url":"https://github.com/atgeirr/opm-autodiff","homepage":null,"size":5161,"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":"master"}},"base":{"label":"OPM:master","ref":"master","sha":"8e2cb4161ac9257a7d1767d34359b35f6411e492","user":{"login":"OPM","id":1827197,"avatar_url":"https://avatars.githubusercontent.com/u/1827197?v=3","gravatar_id":"","url":"https://api.github.com/users/OPM","html_url":"https://github.com/OPM","followers_url":"https://api.github.com/users/OPM/followers","following_url":"https://api.github.com/users/OPM/following{/other_user}","gists_url":"https://api.github.com/users/OPM/gists{/gist_id}","starred_url":"https://api.github.com/users/OPM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPM/subscriptions","organizations_url":"https://api.github.com/users/OPM/orgs","repos_url":"https://api.github.com/users/OPM/repos","events_url":"https://api.github.com/users/OPM/events{/privacy}","received_events_url":"https://api.github.com/users/OPM/received_events","type":"Organization","site_admin":false},"repo":{"id":10097543,"name":"opm-autodiff","full_name":"OPM/opm-autodiff","owner":{"login":"OPM","id":1827197,"avatar_url":"https://avatars.githubusercontent.com/u/1827197?v=3","gravatar_id":"","url":"https://api.github.com/users/OPM","html_url":"https://github.com/OPM","followers_url":"https://api.github.com/users/OPM/followers","following_url":"https://api.github.com/users/OPM/following{/other_user}","gists_url":"https://api.github.com/users/OPM/gists{/gist_id}","starred_url":"https://api.github.com/users/OPM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPM/subscriptions","organizations_url":"https://api.github.com/users/OPM/orgs","repos_url":"https://api.github.com/users/OPM/repos","events_url":"https://api.github.com/users/OPM/events{/privacy}","received_events_url":"https://api.github.com/users/OPM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OPM/opm-autodiff","description":"Utilities for automatic differentiation and simulators based on AD.","fork":false,"url":"https://api.github.com/repos/OPM/opm-autodiff","forks_url":"https://api.github.com/repos/OPM/opm-autodiff/forks","keys_url":"https://api.github.com/repos/OPM/opm-autodiff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OPM/opm-autodiff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OPM/opm-autodiff/teams","hooks_url":"https://api.github.com/repos/OPM/opm-autodiff/hooks","issue_events_url":"https://api.github.com/repos/OPM/opm-autodiff/issues/events{/number}","events_url":"https://api.github.com/repos/OPM/opm-autodiff/events","assignees_url":"https://api.github.com/repos/OPM/opm-autodiff/assignees{/user}","branches_url":"https://api.github.com/repos/OPM/opm-autodiff/branches{/branch}","tags_url":"https://api.github.com/repos/OPM/opm-autodiff/tags","blobs_url":"https://api.github.com/repos/OPM/opm-autodiff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OPM/opm-autodiff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OPM/opm-autodiff/git/refs{/sha}","trees_url":"https://api.github.com/repos/OPM/opm-autodiff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OPM/opm-autodiff/statuses/{sha}","languages_url":"https://api.github.com/repos/OPM/opm-autodiff/languages","stargazers_url":"https://api.github.com/repos/OPM/opm-autodiff/stargazers","contributors_url":"https://api.github.com/repos/OPM/opm-autodiff/contributors","subscribers_url":"https://api.github.com/repos/OPM/opm-autodiff/subscribers","subscription_url":"https://api.github.com/repos/OPM/opm-autodiff/subscription","commits_url":"https://api.github.com/repos/OPM/opm-autodiff/commits{/sha}","git_commits_url":"https://api.github.com/repos/OPM/opm-autodiff/git/commits{/sha}","comments_url":"https://api.github.com/repos/OPM/opm-autodiff/comments{/number}","issue_comment_url":"https://api.github.com/repos/OPM/opm-autodiff/issues/comments{/number}","contents_url":"https://api.github.com/repos/OPM/opm-autodiff/contents/{+path}","compare_url":"https://api.github.com/repos/OPM/opm-autodiff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OPM/opm-autodiff/merges","archive_url":"https://api.github.com/repos/OPM/opm-autodiff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OPM/opm-autodiff/downloads","issues_url":"https://api.github.com/repos/OPM/opm-autodiff/issues{/number}","pulls_url":"https://api.github.com/repos/OPM/opm-autodiff/pulls{/number}","milestones_url":"https://api.github.com/repos/OPM/opm-autodiff/milestones{/number}","notifications_url":"https://api.github.com/repos/OPM/opm-autodiff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OPM/opm-autodiff/labels{/name}","releases_url":"https://api.github.com/repos/OPM/opm-autodiff/releases{/id}","created_at":"2013-05-16T08:59:22Z","updated_at":"2015-12-18T07:05:01Z","pushed_at":"2015-12-18T12:47:24Z","git_url":"git://github.com/OPM/opm-autodiff.git","ssh_url":"git@github.com:OPM/opm-autodiff.git","clone_url":"https://github.com/OPM/opm-autodiff.git","svn_url":"https://github.com/OPM/opm-autodiff","homepage":null,"size":5335,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":12,"forks":22,"open_issues":12,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OPM/opm-autodiff/pulls/561"},"html":{"href":"https://github.com/OPM/opm-autodiff/pull/561"},"issue":{"href":"https://api.github.com/repos/OPM/opm-autodiff/issues/561"},"comments":{"href":"https://api.github.com/repos/OPM/opm-autodiff/issues/561/comments"},"review_comments":{"href":"https://api.github.com/repos/OPM/opm-autodiff/pulls/561/comments"},"review_comment":{"href":"https://api.github.com/repos/OPM/opm-autodiff/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OPM/opm-autodiff/pulls/561/commits"},"statuses":{"href":"https://api.github.com/repos/OPM/opm-autodiff/statuses/bfcbd094884e26bbf1b095823083b094049cb39a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":15,"additions":945,"deletions":1167,"changed_files":12}}