{"action":"created","issue":{"url":"https://api.github.com/repos/ibaned/omega_h/issues/256","repository_url":"https://api.github.com/repos/ibaned/omega_h","labels_url":"https://api.github.com/repos/ibaned/omega_h/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/ibaned/omega_h/issues/256/comments","events_url":"https://api.github.com/repos/ibaned/omega_h/issues/256/events","html_url":"https://github.com/ibaned/omega_h/issues/256","id":356523478,"node_id":"MDU6SXNzdWUzNTY1MjM0Nzg=","number":256,"title":"Skip adaption if error is small ","user":{"login":"bonh","id":14147559,"node_id":"MDQ6VXNlcjE0MTQ3NTU5","avatar_url":"https://avatars3.githubusercontent.com/u/14147559?v=4","gravatar_id":"","url":"https://api.github.com/users/bonh","html_url":"https://github.com/bonh","followers_url":"https://api.github.com/users/bonh/followers","following_url":"https://api.github.com/users/bonh/following{/other_user}","gists_url":"https://api.github.com/users/bonh/gists{/gist_id}","starred_url":"https://api.github.com/users/bonh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonh/subscriptions","organizations_url":"https://api.github.com/users/bonh/orgs","repos_url":"https://api.github.com/users/bonh/repos","events_url":"https://api.github.com/users/bonh/events{/privacy}","received_events_url":"https://api.github.com/users/bonh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-03T14:17:39Z","updated_at":"2018-09-14T13:07:46Z","closed_at":null,"author_association":"NONE","body":"As one can see from the following output, the meshes before and after the adaption step are virtually the same. Nevertheless, I assume, that the mesh is updated inside Omega_h. Now, if the mesh changes, I have to reconstruct my preconditioner - even, if the mesh does not really change. And this steps takes a lot of time...\r\n\r\nNow my question:\r\nIs it possible to introduce some kind of feedback from Omega_h's `adapt` if the mesh has changed \"a lot\", e.g., a boolean. Then I could use this boolean to skip the recreation of my preconditioner. \r\n@ibaned or do you have a different solution?\r\n\r\n```\r\nlimited gradation in 1 steps\r\ngenerated metrics in 0.0552537 seconds\r\nbefore adapting:\r\n21326 tets, quality [0.30,1.00], 21326 >0.30\r\n26608 edges, length [0.25,1.55], 2536 <0.71, 24052 in [0.71,1.41], 20 >1.41\r\nafter adapting:\r\n21334 tets, quality [0.30,1.00], 21334 >0.30\r\n26624 edges, length [0.25,1.55], 2541 <0.71, 24076 in [0.71,1.41], 7 >1.41\r\naddressing edge lengths took 0.179833 seconds\r\naddressing element qualities took 0.0247778 seconds\r\nadapting took 0.205315 seconds\r\n```"},"comment":{"url":"https://api.github.com/repos/ibaned/omega_h/issues/comments/421352675","html_url":"https://github.com/ibaned/omega_h/issues/256#issuecomment-421352675","issue_url":"https://api.github.com/repos/ibaned/omega_h/issues/256","id":421352675,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTM1MjY3NQ==","user":{"login":"bonh","id":14147559,"node_id":"MDQ6VXNlcjE0MTQ3NTU5","avatar_url":"https://avatars3.githubusercontent.com/u/14147559?v=4","gravatar_id":"","url":"https://api.github.com/users/bonh","html_url":"https://github.com/bonh","followers_url":"https://api.github.com/users/bonh/followers","following_url":"https://api.github.com/users/bonh/following{/other_user}","gists_url":"https://api.github.com/users/bonh/gists{/gist_id}","starred_url":"https://api.github.com/users/bonh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonh/subscriptions","organizations_url":"https://api.github.com/users/bonh/orgs","repos_url":"https://api.github.com/users/bonh/repos","events_url":"https://api.github.com/users/bonh/events{/privacy}","received_events_url":"https://api.github.com/users/bonh/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T13:07:46Z","updated_at":"2018-09-14T13:07:46Z","author_association":"NONE","body":"Well, let me clarify my question: \r\nIn my simulation code I am doing something like that:\r\n```\r\nold_mesh # generate initial mesh\r\nnew_mesh = old_mesh\r\nold_result # generate initial data\r\nnew_result = old_result\r\nwhile t<t_end: # time loop\r\n    t+=1\r\n    model.init(new_mesh) # initialize data and solvers, preconditioners, ...\r\n    old_result.interpolate(new_result)\r\n    new_result = model.solve(old_result) # my pde code\r\n    new_mesh = adapt_mesh(old_mesh, new_result) # omega_h    \r\n```\r\nNow, what I want to do is:\r\n```\r\nold_mesh # generate initial mesh\r\nnew_mesh = old_mesh\r\nold_result # generate initial data\r\nnew_result = old_result\r\nwhile t<t_end: # time loop\r\n    t+=1\r\n    if mesh_change_in_percent > 0.01:\r\n        model.init(new_mesh) # initialize data and solvers, preconditioners, ...\r\n    old_result.interpolate(new_result)\r\n    new_result = model.solve(old_result) # my pde code\r\n    new_mesh, mesh_change_in_percent = adapt_mesh(old_mesh, new_result) # omega_h    \r\n```\r\nSo, if `omega_h` returns some kind of value ('mesh_change_in_percent`), which represents the amount of mesh changes, I can use this value in my higher level code to decide if I want to use the new mesh (leading to a re-initialization of all solver structures) or reuse the old mesh (with reusing the old solver structures). I am not sure which return value makes sense though..."}}
{"actor":{"display_login":"bonh"}}