I need to verify collisions between two rotating ellipses. At the moment, I’m using continuous callbacks; however, I’m not sure if this is the most efficient way or how to do it. I need the collisions to be checked during the integration timestep.
If it needs to be checked during the time step then it needs to be a continuous callback.
Since you said verify, it could be that discrete callbacks or no callbacks are sufficient.
If you want to capture the first time of collision (event tracking), then you need a continuous callback. Note that these callbacks typically do root finding and hence impact the time stepping itself.
If you only care about the question “does something overlap” at time step X, then you can just use discrete callbacks which are just conditions checked after each time step without root finding.