Simulation stops after erasing body in a periodic siulation (problem with InsertionSortCollider() )
Hello Everyone,
Recently, two questions were asked about the problems with erasing bodies in a periodic simulation [1,2]. In the first one, clearing interactions solved the problem. In the second one, after a particle is erased, the whole simulation stops, and no error message is indicated. InsertionSOrtCollider()
was a culprit. So far, the best solution I have found is setting O.bodies.enableRedirection = False
[3], which probably affects the option keepListsShort
[4]. I have found out that there is some "awareness" of the issue. For example, an experimental feature for heavy insert/delete exists [5]. Also, the code has' FIXME' [6], indicating that some parts of the algorithm may not work properly for periodic boundaries. Nevertheless, after @bchareyre comment, I checked the issues and couldn't find one related to this issue, so I prepared this summary.
Best wishes, Karol
[2] answers#3895
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.BodyContainer.enableRedirection
[4] https://yade-dem.org/doc/yade.wrapper.html?highlight=insertionsortcollider#yade.wrapper.InsertionSortCollider.keepListsShort [5] https://yade-dem.org/doc/yade.wrapper.html?highlight=insertionsortcollider#yade.wrapper.InsertionSortCollider.smartInsertErase [6] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/common/InsertionSortCollider.cpp?ref_type=heads#L434