Skip to content

Fix interiorDelete bug - #616

Open
rammann wants to merge 2 commits into
masterfrom
615-fix-destroy
Open

rammann wants to merge 2 commits into
masterfrom
615-fix-destroy

Conversation

@rammann

@rammann rammann commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses the issue #615.
The bug came from the ambiguity of maxDeleteIndex=0, which occurred when there was one invalid particle at index 0 in the valid region, but also when there was no invalid particle in the valid region. The latter is what cause the bug described in #615.

If we count the number of positive entries in locDeleteIndex directly instead of finding the largest index of locDeleteIndex which is positive. This way the prior case above correctly count 1 and the latter (buggy) case 0. We then directly destroy with the count instead of index+1.

Closes #615.

@rammann rammann added bug Something isn't working gitlab-mirror labels Oct 15, 2026
@rammann rammann assigned rammann and unassigned aaadelmann Oct 16, 2026
@rammann
rammann requested a review from aaadelmann October 16, 2026 06:53
@rammann rammann changed the title number of delete indexes instead of finding the largest index to delte Fix interiorDelete bug Oct 16, 2026
@rammann
rammann enabled auto-merge October 19, 2026 08:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gitlab-mirror

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ParticleBase::internalDestroy writes before View when no deleted particle is in the kept range

3 participants