{"action":"created","issue":{"url":"https://api.github.com/repos/ovainola/JuliaFEM/issues/14","labels_url":"https://api.github.com/repos/ovainola/JuliaFEM/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/ovainola/JuliaFEM/issues/14/comments","events_url":"https://api.github.com/repos/ovainola/JuliaFEM/issues/14/events","html_url":"https://github.com/ovainola/JuliaFEM/issues/14","id":82736140,"number":14,"title":"Automatic differentiation JuliaDiff","user":{"login":"TeroFrondelius","id":12501534,"avatar_url":"https://avatars.githubusercontent.com/u/12501534?v=3","gravatar_id":"","url":"https://api.github.com/users/TeroFrondelius","html_url":"https://github.com/TeroFrondelius","followers_url":"https://api.github.com/users/TeroFrondelius/followers","following_url":"https://api.github.com/users/TeroFrondelius/following{/other_user}","gists_url":"https://api.github.com/users/TeroFrondelius/gists{/gist_id}","starred_url":"https://api.github.com/users/TeroFrondelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeroFrondelius/subscriptions","organizations_url":"https://api.github.com/users/TeroFrondelius/orgs","repos_url":"https://api.github.com/users/TeroFrondelius/repos","events_url":"https://api.github.com/users/TeroFrondelius/events{/privacy}","received_events_url":"https://api.github.com/users/TeroFrondelius/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ovainola/JuliaFEM/labels/architecture","name":"architecture","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ovainola/JuliaFEM/milestones/2","html_url":"https://github.com/ovainola/JuliaFEM/milestones/0.1.0%20release","labels_url":"https://api.github.com/repos/ovainola/JuliaFEM/milestones/2/labels","id":1141123,"number":2,"title":"0.1.0 release","description":"The most important release","creator":{"login":"TeroFrondelius","id":12501534,"avatar_url":"https://avatars.githubusercontent.com/u/12501534?v=3","gravatar_id":"","url":"https://api.github.com/users/TeroFrondelius","html_url":"https://github.com/TeroFrondelius","followers_url":"https://api.github.com/users/TeroFrondelius/followers","following_url":"https://api.github.com/users/TeroFrondelius/following{/other_user}","gists_url":"https://api.github.com/users/TeroFrondelius/gists{/gist_id}","starred_url":"https://api.github.com/users/TeroFrondelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeroFrondelius/subscriptions","organizations_url":"https://api.github.com/users/TeroFrondelius/orgs","repos_url":"https://api.github.com/users/TeroFrondelius/repos","events_url":"https://api.github.com/users/TeroFrondelius/events{/privacy}","received_events_url":"https://api.github.com/users/TeroFrondelius/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2015-05-30T09:59:35Z","updated_at":"2015-06-05T17:16:59Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-05-30T07:32:21Z","updated_at":"2015-06-14T11:27:59Z","closed_at":null,"body":"This sounds right choice for us: http://www.juliadiff.org/\r\n\r\nProbably this decision would mean that we need to implement more lower level code. Anyway it seems that these JuliaDiff packages are under active development. "},"comment":{"url":"https://api.github.com/repos/ovainola/JuliaFEM/issues/comments/111814929","html_url":"https://github.com/ovainola/JuliaFEM/issues/14#issuecomment-111814929","issue_url":"https://api.github.com/repos/ovainola/JuliaFEM/issues/14","id":111814929,"user":{"login":"ahojukka5","id":1264779,"avatar_url":"https://avatars.githubusercontent.com/u/1264779?v=3","gravatar_id":"","url":"https://api.github.com/users/ahojukka5","html_url":"https://github.com/ahojukka5","followers_url":"https://api.github.com/users/ahojukka5/followers","following_url":"https://api.github.com/users/ahojukka5/following{/other_user}","gists_url":"https://api.github.com/users/ahojukka5/gists{/gist_id}","starred_url":"https://api.github.com/users/ahojukka5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahojukka5/subscriptions","organizations_url":"https://api.github.com/users/ahojukka5/orgs","repos_url":"https://api.github.com/users/ahojukka5/repos","events_url":"https://api.github.com/users/ahojukka5/events{/privacy}","received_events_url":"https://api.github.com/users/ahojukka5/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T11:27:59Z","updated_at":"2015-06-14T11:27:59Z","body":"@mlubin are you familiar with Finite Element Method? (https://en.wikipedia.org/wiki/Finite_element_method)\r\n\r\nBasically we are trying to get solutions for a very large system of nonlinear equations, maybe ~10000 dofs/cpu. Equations rise from energy balance of some physical system. After linearisation of nonlinear residual vector the resulting matrix (jacobian) has a sparse structure (each \"element\" has a local support to neighbouring elements). Unknown field is approximated using polynomials so differentiating it is basically well defined task.\r\n\r\nDue to the nature of finite element method the resulting global matrix can be assembled from smaller elements, which have 5~60 dof/element.\r\n\r\nI mainly see two different options to differentiate the global system. One is to differentiate the whole system after assembly (~10000 degrees of freedom/cpu, sparse matrix) but I think it's too hard task. Another more common option is to linearise each single element (5-60 dofs, dense matrix) and after linearisation assemble them to global matrix (sparse matrix) which should be easy enough. I'm experimenting both strategies in notebooks:\r\n\r\nhttps://github.com/ovainola/JuliaFEM/blob/master/docs/2015-05-23-one-element-solution.ipynb\r\nhttps://github.com/ovainola/JuliaFEM/blob/master/notebooks/2015-05-31-two-element-solution.ipynb\r\n\r\nTraditionally each element is linearised analytically before assembly and it needs a lot of cumbersome math. We however believe that this can be done in automatic sense with comparable performance because working proof of concept already exists in FENiCS. (See http://arxiv.org/pdf/1211.4047.pdf, 6.4 from p. A:32 for description how it is done there). I'm happy to give more information about this problem if needed."}}