-
Notifications
You must be signed in to change notification settings - Fork 100
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
refactor update_all_cells #338
refactor update_all_cells #338
Conversation
- fix bug in neighbor list - phagocytosis and fusion could result in removal of a cell - but the neighbor list was not updated - resolve interactions after phenotype updates - this allows the update velocity step to update the neighbors list one time - does move interactions before several steps: - gradient computation - evaluate interactions (so fewer interactions to evaluate) - custom rule - update velocity - springs - do not allow spontaneous spring detachments caused by attack - refactor how timing is done for simplicity
for( int i=0; i < (*all_cells).size(); i++ ) | ||
{ | ||
Cell* pC = (*all_cells)[i]; | ||
standard_cell_cell_interactions(pC,pC->phenotype,time_since_last_mechanics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, very happy to discuss more. By side effects, do you mean unintended behavior and/or errors? Or do you mean changes from how it ran before?
If we find this to be a long discussion, I would prefer to get a quick fix for this bug while we keep working on a longterm fix. Perhaps something like (the highly inefficient) #339?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean unintended behavior (like in PR #340 ), as the attach and detach dynamics were working fine in the previous release. I feel that by making this call order change, we might introduce these issues and possibly others we haven’t considered yet. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the correct fix to a bug is to reorder operations to avoid the bug. |
Another option that @rheiland worked out was to update the |
I do think we need to say: if lingering neighbors after cell deletion is the problem, then the correct fix is to correct those neighbor lists at the time of cell deletion. (This is what we did in spring links. We just do the same for neighbor lists now.) If A is neighbor to (B,C,D), then B, C and D are also neighbors to A. When A is deleted, remove A from the neighbor lists of B, D and D |
Here was where @rheiland documented this fix: #320 (comment) My main reason for not opting for this solution is that we do not enforce that the |
another fix is being formulated... |
This is responsive to issue #320
do not allow spontaneous spring detachments caused by attack(now a separate pr in disallow random detachment from attack #340 )