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

Speed issues with immersed boundary interactions #42

Open
mountaindust opened this issue Jun 2, 2021 · 1 comment
Open

Speed issues with immersed boundary interactions #42

mountaindust opened this issue Jun 2, 2021 · 1 comment

Comments

@mountaindust
Copy link
Owner

The static methods _project_and_slide, _seg_intersect_2D, and (probably) _seg_intersect_3D_triangles are about as fast as they are going to be in Python/NumPy, but are still a major bottleneck. One only needs to run an FTLE solve with and without the immersed boundary structures to see the huge difference it makes.

Parallelization will likely do much to solve this problem, since these methods are typically called in a loop over all agents. This would need to be implemented in apply_boundary_conditions, where the loop is.

Another thing that may be considered: since all the action is in static methods, these methods could (relatively) easily be written in C to speed up each calculation to some degree.

@mountaindust
Copy link
Owner Author

Instead of rewriting in C, maybe we can just jit compile these with Numba for the time being...? Numba also offers parallelization on either CPU or GPU, so we could really make this fast in a hurry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant