{"action":"created","issue":{"url":"https://api.github.com/repos/OPM/opm-core/issues/1047","repository_url":"https://api.github.com/repos/OPM/opm-core","labels_url":"https://api.github.com/repos/OPM/opm-core/issues/1047/labels{/name}","comments_url":"https://api.github.com/repos/OPM/opm-core/issues/1047/comments","events_url":"https://api.github.com/repos/OPM/opm-core/issues/1047/events","html_url":"https://github.com/OPM/opm-core/pull/1047","id":162157780,"number":1047,"title":"Do not compute WellState::numPhases","user":{"login":"blattms","id":1944640,"avatar_url":"https://avatars.githubusercontent.com/u/1944640?v=3","gravatar_id":"","url":"https://api.github.com/users/blattms","html_url":"https://github.com/blattms","followers_url":"https://api.github.com/users/blattms/followers","following_url":"https://api.github.com/users/blattms/following{/other_user}","gists_url":"https://api.github.com/users/blattms/gists{/gist_id}","starred_url":"https://api.github.com/users/blattms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blattms/subscriptions","organizations_url":"https://api.github.com/users/blattms/orgs","repos_url":"https://api.github.com/users/blattms/repos","events_url":"https://api.github.com/users/blattms/events{/privacy}","received_events_url":"https://api.github.com/users/blattms/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-24T14:20:04Z","updated_at":"2016-06-27T09:01:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OPM/opm-core/pulls/1047","html_url":"https://github.com/OPM/opm-core/pull/1047","diff_url":"https://github.com/OPM/opm-core/pull/1047.diff","patch_url":"https://github.com/OPM/opm-core/pull/1047.patch"},"body":"but store it during initialization and reuse it afterwards. Previously it was computed by dividing\r\nthe size of the bhp_ array by the number of wells. This crashed if there were no wells present/active, e.g. when writing the report step.\r\n\r\nCloses OPM/opm-simulators#731"},"comment":{"url":"https://api.github.com/repos/OPM/opm-core/issues/comments/228690595","html_url":"https://github.com/OPM/opm-core/pull/1047#issuecomment-228690595","issue_url":"https://api.github.com/repos/OPM/opm-core/issues/1047","id":228690595,"user":{"login":"blattms","id":1944640,"avatar_url":"https://avatars.githubusercontent.com/u/1944640?v=3","gravatar_id":"","url":"https://api.github.com/users/blattms","html_url":"https://github.com/blattms","followers_url":"https://api.github.com/users/blattms/followers","following_url":"https://api.github.com/users/blattms/following{/other_user}","gists_url":"https://api.github.com/users/blattms/gists{/gist_id}","starred_url":"https://api.github.com/users/blattms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blattms/subscriptions","organizations_url":"https://api.github.com/users/blattms/orgs","repos_url":"https://api.github.com/users/blattms/repos","events_url":"https://api.github.com/users/blattms/events{/privacy}","received_events_url":"https://api.github.com/users/blattms/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T09:01:52Z","updated_at":"2016-06-27T09:01:52Z","body":"I beg to differ: It does work for the current OPM as numPhases() will be called but the result never used if there are no wells. (Norne and SPE cases run through).\r\n\r\nThe problem concerning the extra constructor argument is that the usual call sequence is:\r\n```\r\n    WellState well_state;\r\n    well_state.init(wells, state);\r\n```\r\nRetrieving the number of phases from eclipse state in addition seems like extra work.\r\n\r\nAnyway, I will post a competing PR to this one in  a minute."}}
{"actor":{"display_login":"blattms"}}