Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taal: AMR callback should "notify" "all" parts of the code when the mesh has changed #215

Open
sloede opened this issue Oct 11, 2020 · 5 comments
Labels
enhancement New feature or request taal

Comments

@sloede
Copy link
Member

sloede commented Oct 11, 2020

I think now that you are already optimizing the dt calculation on have_constant_speed, we should probably skip calculating dt in each time step for those cases and only calculate it once after each mesh adaptation and store it in some cache.

Originally posted by @sloede in #200 (comment)

That's a good suggestion but requires additional logic. For example, the AMR callback and the stepsize callback need to know each other to do that. As you may have seen in other TODO notes, I was thinking about letting the AMR callback notify everything when something has been adapted. If we implement that, we can also add this optimization. Could you please open an issue for that?

Originally posted by @ranocha in #200 (comment)

@sloede sloede added the taal label Oct 11, 2020
@sloede sloede changed the title Taal: AMR callback should "notify" "all" parts of the code that the mesh Taal: AMR callback should "notify" "all" parts of the code when the mesh has changed Oct 11, 2020
@sloede sloede added the enhancement New feature or request label Oct 11, 2020
@ranocha
Copy link
Member

ranocha commented Dec 8, 2020

What about introducing appropriate methods of resize! to do this? That's similar to the approach of the DiffEq ecosystem and seems to fit well, I think.

@sloede
Copy link
Member Author

sloede commented Dec 8, 2020

Which resize! are we talking about? The one for u_ode?

@ranocha
Copy link
Member

ranocha commented Dec 8, 2020

No, something like resize!(semi, new_size) and resize!(callback, new_size) which propagate to the appropriate caches.

@sloede
Copy link
Member Author

sloede commented Dec 8, 2020

Hm, so without any arguments for a new size, just as an "something has changed" indicator? In that case, what about using something more descriptive such as mesh_has_changed!? I am not 100% convinced on the name resize!, since technically we do not need to resize anything if we coarsen once and refine once while we still need to update our internal data structures.

@ranocha
Copy link
Member

ranocha commented Dec 8, 2020

I'm sorry, I forgot the new_size in the first version above. I would like to keep that, of course!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request taal
Projects
None yet
Development

No branches or pull requests

2 participants