{"action":"created","issue":{"url":"https://api.github.com/repos/OPM/opm-core/issues/438","labels_url":"https://api.github.com/repos/OPM/opm-core/issues/438/labels{/name}","comments_url":"https://api.github.com/repos/OPM/opm-core/issues/438/comments","events_url":"https://api.github.com/repos/OPM/opm-core/issues/438/events","html_url":"https://github.com/OPM/opm-core/issues/438","id":23068204,"number":438,"title":"Property objects for autodiff and core have partially inconsistent interfaces","user":{"login":"andlaus","id":1837735,"avatar_url":"https://avatars.githubusercontent.com/u/1837735?v=3","gravatar_id":"","url":"https://api.github.com/users/andlaus","html_url":"https://github.com/andlaus","followers_url":"https://api.github.com/users/andlaus/followers","following_url":"https://api.github.com/users/andlaus/following{/other_user}","gists_url":"https://api.github.com/users/andlaus/gists{/gist_id}","starred_url":"https://api.github.com/users/andlaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andlaus/subscriptions","organizations_url":"https://api.github.com/users/andlaus/orgs","repos_url":"https://api.github.com/users/andlaus/repos","events_url":"https://api.github.com/users/andlaus/events{/privacy}","received_events_url":"https://api.github.com/users/andlaus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2013-11-21T14:03:40Z","updated_at":"2015-10-21T08:26:24Z","closed_at":"2015-10-21T08:26:24Z","body":"for example, the current API for relative permeability in autodiff is\r\n\r\n```\r\n        virtual\r\n        std::vector<V> relperm(const V& sw,\r\n                               const V& so,\r\n                               const V& sg,\r\n                               const Cells& cells) const;\r\n```\r\n\r\nwhile it is\r\n\r\n```\r\n        virtual void relperm(const int n,\r\n                             const double* s,\r\n                             const int* cells,\r\n                             double* kr,\r\n                             double* dkrds) const;\r\n```\r\n\r\nin core. If I understood this correctly, the s array in core is a pointer of numCells arrays each consisting of the canonical saturations of each cell. On the other side of the fence, the autodiff interface uses three separate arrays for the canonical phase saturations. In both cases, this kind of interface requires to jump through hops if the saturations from the BlackoilState class ought to be used because this one only contains a concatenated array of the saturations of the used phases.\r\n\r\nIf I understood this correctly, it even gets worse in the AD interface which also contains the method\r\n\r\n```\r\n std::vector<ADB> relperm(const ADB& sw,\r\n                                 const ADB& so,\r\n                                 const ADB& sg,\r\n                                 const Cells& cells) const\r\n```\r\n\r\nwhich requires AutoDiffBlocks for _all_ saturations as input but only produces an AutoDiffBlock for the _used_ phases.\r\n\r\nsynopsis: I'm confused...\r\n"},"comment":{"url":"https://api.github.com/repos/OPM/opm-core/issues/comments/149815410","html_url":"https://github.com/OPM/opm-core/issues/438#issuecomment-149815410","issue_url":"https://api.github.com/repos/OPM/opm-core/issues/438","id":149815410,"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},"created_at":"2015-10-21T08:26:24Z","updated_at":"2015-10-21T08:26:24Z","body":"I will close this, as it is not something we can or will target, specifically. The issue discussed is still relevant, but the matter is larger: the property systems should be continuously refactored. The underlying dilemma between assuming AD types or not in the interface will no go away."}}