{"action":"created","issue":{"url":"https://api.github.com/repos/libantioch/antioch/issues/148","labels_url":"https://api.github.com/repos/libantioch/antioch/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/libantioch/antioch/issues/148/comments","events_url":"https://api.github.com/repos/libantioch/antioch/issues/148/events","html_url":"https://github.com/libantioch/antioch/pull/148","id":81025040,"number":148,"title":"Transport Refactor","user":{"login":"pbauman","id":3051555,"avatar_url":"https://avatars.githubusercontent.com/u/3051555?v=3","gravatar_id":"","url":"https://api.github.com/users/pbauman","html_url":"https://github.com/pbauman","followers_url":"https://api.github.com/users/pbauman/followers","following_url":"https://api.github.com/users/pbauman/following{/other_user}","gists_url":"https://api.github.com/users/pbauman/gists{/gist_id}","starred_url":"https://api.github.com/users/pbauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbauman/subscriptions","organizations_url":"https://api.github.com/users/pbauman/orgs","repos_url":"https://api.github.com/users/pbauman/repos","events_url":"https://api.github.com/users/pbauman/events{/privacy}","received_events_url":"https://api.github.com/users/pbauman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-05-26T15:58:01Z","updated_at":"2015-06-19T12:54:36Z","closed_at":"2015-06-19T12:54:14Z","pull_request":{"url":"https://api.github.com/repos/libantioch/antioch/pulls/148","html_url":"https://github.com/libantioch/antioch/pull/148","diff_url":"https://github.com/libantioch/antioch/pull/148.diff","patch_url":"https://github.com/libantioch/antioch/pull/148.patch"},"body":"Apologies in advance for taking a play from @SylvainPlessis's playbook on the length of this PR. I can divide this up into 3 or 4 parts, but it gets worse before it gets better so I at least wanted the finished product to be seen.\r\n\r\nThis is not yet complete, but preliminary review can begin. The diffs are a little messy, so looking at the final file might help as well.\r\n\r\n`PhysicalSet` is now gone. What has replaced it is handling the transport in 3 different container classes: `MixtureViscosity` (this was already there), `MixtureConductivity`, and `MixtureDiffusion`.  (These subclass `MixtureTransport` in order to contain some common code.) These classes contain the species models and provide the API used by `WilkeTransportEvaluator` for evaluating species-level properties. This is effectively what `PhysicalSet` was providing before, but I think this is easier to read and is (at this point) ~1500+ lines shorter. \r\n\r\n`MixtureDiffusion` is still a bit ugly because of the tagging, but some documentation should help. Note that in the history I'd first gone down the path of splitting it into `MixtureSpeciesDiffusion` (for `SpeciesDiffusionBase` models) and MixtureBinaryDiffusion (for `BinaryDiffusionBase` models), but this wasn't going to allow us to reduce the templating to only the species-level model in `WilkeTransportEvaluator`, so I abandoned that approach and decided to have `MixtureDiffusion` handle both types of models. Hence the tagging.\r\n\r\nAdditionally, for the viscosity and diffusion, I've setup CRTP base classes for the species models to enforce an API on the species evaluations. I can set this up for the conductivity as well, but I'd love some suggestions on the naming (right now there's \"with diffusion\" and \"without diffusion\").\r\n\r\nAt the `WilkeTransportEvaluator` level, we use traits classes to differentiate between calling the correct API depending on the model; currently it's only there for the diffusion, but conductivity is forthcoming. The idea is to hide these details from the user and let the template parameters handle the dispatch. Then, we guard against instantiating with incompatible types as much as possible; if we can't `static_assert`, then we runtime error.\r\n\r\nThings still to be done in this PR: documentation pass, restoring compatibility with `WilkeEvaluator`, conductivity traits (for better managing/guarding WilkeTransportEvaluator), and removing `Conditions` template parameters in `WilkeTransportEvaluator`.\r\n\r\nBeyond this PR: I'd like to redo the API before the 0.3.0 release to have the `WilkeTransportEvaluator` take only a `const TransportConditions` object for input quantities (similar to kinetics where the user only supplies a `KineticsConditions` object). Then, what we can do is create constructors that enforce setting the properties needed for each of the subsequent calculations, depending on the species-level template parameters and have a nice clean API. 0.3.0 added all this new API so I think it makes sense to finalize it before 0.3.0. (Some discussion about this is/was taking place [here](https://groups.google.com/d/msg/antioch-devel/7Rk0kKj371c/zRxiBs37OYEJ).)"},"comment":{"url":"https://api.github.com/repos/libantioch/antioch/issues/comments/113506483","html_url":"https://github.com/libantioch/antioch/pull/148#issuecomment-113506483","issue_url":"https://api.github.com/repos/libantioch/antioch/issues/148","id":113506483,"user":{"login":"pbauman","id":3051555,"avatar_url":"https://avatars.githubusercontent.com/u/3051555?v=3","gravatar_id":"","url":"https://api.github.com/users/pbauman","html_url":"https://github.com/pbauman","followers_url":"https://api.github.com/users/pbauman/followers","following_url":"https://api.github.com/users/pbauman/following{/other_user}","gists_url":"https://api.github.com/users/pbauman/gists{/gist_id}","starred_url":"https://api.github.com/users/pbauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbauman/subscriptions","organizations_url":"https://api.github.com/users/pbauman/orgs","repos_url":"https://api.github.com/users/pbauman/repos","events_url":"https://api.github.com/users/pbauman/events{/privacy}","received_events_url":"https://api.github.com/users/pbauman/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T12:54:36Z","updated_at":"2015-06-19T12:54:36Z","body":"I'll wait until we close the other remaining PRs for 0.3.0 before merging to master."}}