Repository navigation
Conversation
The writer saves relative_maximum_adhesion_distance, maximum_number_of_attachments, attachment_elastic_constant, attachment_rate, detachment_rate, but recreate_sim_state() assigned them as if the order were attachment_elastic_constant, attachment_rate, detachment_rate, relative_maximum_adhesion_distance, maximum_number_of_attachments. Resumed cells got those five values scrambled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes.
No open issues 🎉
What changed in this PR
Fixes restoration of five mechanics parameters when resuming a simulation from MultiCellDS data by matching the reader’s assignments to the writer’s saved order.
Changes:
- Reorders the five parameter assignments to prevent swapped values.
- Updates debug output and the explanatory comment to match.
| File | Description |
|---|---|
modules/PhysiCell_MultiCellDS.cpp |
Corrects mechanics parameter restoration order and corresponding debug output. |
Review effort: Balanced
Collaborator
|
Good catch! Weird. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
recreate_sim_state()(used byresume_from_MultiCellDS()) reads the five trailing mechanics parameters in one block but assigns them in a different order from the one the writer saves them in. The writer's order isrelative_maximum_adhesion_distance,maximum_number_of_attachments,attachment_elastic_constant,attachment_rate,detachment_rate. As a result, every resumed cell got those five values swapped around, e.g. itsattachment_elastic_constantwas set to the savedrelative_maximum_adhesion_distance. This PR reorders the assignments (and the debug prints) to match the writer.🤖 Generated with Claude Code