amusecode / amuse

Astrophysical Multipurpose Software Environment. This is the main repository for AMUSE
http://www.amusecode.org
Apache License 2.0
152 stars 98 forks source link

Added collision handler for Huayno OK algorithm #1058

Open ErwanH29 opened 1 month ago

ErwanH29 commented 1 month ago

Integrated the collision detection algorithm from the various SHARED_COLLISION Huayno integrators into the OK integrator. Note: This collision checker does not detect collisions between two massless particles.

ErwanH29 commented 1 month ago

I made a new file which hosts the collision detection function and with which both evolve_shared_collisions.c and evolve_ok.c call. The algorithm neglects collisions between two massless particles to save computing time at the detriment that perhaps this isn't an assumption that some users would want. If that is a bother I can rewrite the code to include it.

I hope the changes are fine. I tested collisions using either integrators and I don't see a change in performance.

rieder commented 1 month ago

This PR needs at least a test to show that this collision detection actually works before it can be merged.