{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl/issues/76","repository_url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl","labels_url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl/issues/76/comments","events_url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl/issues/76/events","html_url":"https://github.com/JuliaDiffEq/DiffEqOperators.jl/pull/76","id":354887861,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNTQ1MzA5","number":76,"title":"WIP: Generic Derivative Operators","user":{"login":"MSeeker1340","id":30965945,"node_id":"MDQ6VXNlcjMwOTY1OTQ1","avatar_url":"https://avatars1.githubusercontent.com/u/30965945?v=4","gravatar_id":"","url":"https://api.github.com/users/MSeeker1340","html_url":"https://github.com/MSeeker1340","followers_url":"https://api.github.com/users/MSeeker1340/followers","following_url":"https://api.github.com/users/MSeeker1340/following{/other_user}","gists_url":"https://api.github.com/users/MSeeker1340/gists{/gist_id}","starred_url":"https://api.github.com/users/MSeeker1340/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSeeker1340/subscriptions","organizations_url":"https://api.github.com/users/MSeeker1340/orgs","repos_url":"https://api.github.com/users/MSeeker1340/repos","events_url":"https://api.github.com/users/MSeeker1340/events{/privacy}","received_events_url":"https://api.github.com/users/MSeeker1340/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-28T20:18:57Z","updated_at":"2018-09-01T22:59:53Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl/pulls/76","html_url":"https://github.com/JuliaDiffEq/DiffEqOperators.jl/pull/76","diff_url":"https://github.com/JuliaDiffEq/DiffEqOperators.jl/pull/76.diff","patch_url":"https://github.com/JuliaDiffEq/DiffEqOperators.jl/pull/76.patch"},"body":"The aim is to implement the generic `L*QB` derivative operators as described by the dev document of https://github.com/JuliaDiffEq/PDERoadmap. I'll leave the current operators unchanged and prep this as an developmental branch of sorts to experiment on.\r\n\r\nWhat we need:\r\n\r\n- [x] Stencil operator (extended domain -> interior) types which use the Fornberg algorithm to generate stencil coefficients and carry out stencil convolution operations.\r\n\r\n- [ ] ~~Boundary extrapolation operators (interior -> extended domain). Most likely will use LazyArrays.jl to make these more efficient memory-wise.~~\r\n\r\n- [x] `GenericDerivativeOperator` which is basically one stencil operator (or a combination of them) and a boundary extrapolation operator. \r\n\r\nCurrently I've finished the first part and modeled the `UniformDerivativeStencil`, `IrregularDerivativeStencil` and `UniformUpwindStencil` types on the current `DerivativeOperator`, `FiniteDifference` and `UpwindOperator` (I can add a `IrregularUpwindStencil` later). Basically I just removed all parts related to the boundary conditions, along with some minor changes (e.g. storing the entire size in `L.dimension` as they are now rectangular).\r\n\r\nFor the upwind stencils, I've chosen the option 2 route of https://github.com/JuliaDiffEq/PDERoadmap/pull/34#issuecomment-415824216, i.e. have the coefficients be handled at the stencil level so that they can function alone and be freely composed. One change I've made is that instead of embedding the coefficients in the stencil types, I instead utilized the scaled operator type that is generated naturally by left multiplying a scalar and overloaded the multiplication method for it. I think this can make the expression tree easier to analyze and the `UniformUpwindStencil` type interface simpler.\r\n\r\nI'm not 100% sure about the correctness of the stencil operation though. I can't really decipher the semantics of `UpwindOperator`, in particular what's the deal with `stencil_rem`. I've checked that the simple first-order upwind derivative is ok but somebody with more experience on the subject should probably take a closer look at this."},"comment":{"url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl/issues/comments/417893052","html_url":"https://github.com/JuliaDiffEq/DiffEqOperators.jl/pull/76#issuecomment-417893052","issue_url":"https://api.github.com/repos/JuliaDiffEq/DiffEqOperators.jl/issues/76","id":417893052,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzg5MzA1Mg==","user":{"login":"ChrisRackauckas","id":1814174,"node_id":"MDQ6VXNlcjE4MTQxNzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1814174?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisRackauckas","html_url":"https://github.com/ChrisRackauckas","followers_url":"https://api.github.com/users/ChrisRackauckas/followers","following_url":"https://api.github.com/users/ChrisRackauckas/following{/other_user}","gists_url":"https://api.github.com/users/ChrisRackauckas/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisRackauckas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisRackauckas/subscriptions","organizations_url":"https://api.github.com/users/ChrisRackauckas/orgs","repos_url":"https://api.github.com/users/ChrisRackauckas/repos","events_url":"https://api.github.com/users/ChrisRackauckas/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisRackauckas/received_events","type":"User","site_admin":false},"created_at":"2018-09-01T22:59:53Z","updated_at":"2018-09-01T22:59:53Z","author_association":"MEMBER","body":">I'm not 100% sure about the correctness of the stencil operation though. I can't really decipher the semantics of UpwindOperator, in particular what's the deal with stencil_rem. I've checked that the simple first-order upwind derivative is ok but somebody with more experience on the subject should probably take a closer look at this.\r\n\r\nI think this handling was required for order > 2 stencils. Essentially, when order > 2 then you get more than one point to the left/right. To handle the BCs is a little tricky at that point. What we did was 1-sided differences near the BCs. However, now I know that's less stable, so what it should be is instead a non-symmetric difference of the right order which uses exactly to the boundary point, and the boundary point is then determined by the ghost point value. Now that it's all formalized this is clear how to do, but it wasn't back then!\r\n\r\n>Of course, the handling of boundary conditions/Q is still very crude at the moment. In particular, the current implementation of applyQ! and constructQ packs everything in a giant conditional, which could be improved e.g. by encoding the BCs as types instead of symbols so they can be dispatched on.\r\n\r\nYeah. \r\n"}}
{"actor":{"display_login":"ChrisRackauckas"}}