Skip to content
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

enable cell definition reset. #268

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

elmbeech
Copy link
Contributor

@elmbeech elmbeech commented Jul 14, 2024

in the big picture, cell definitions can be re-set by calling the cell_defaults = PhysiCell::Cell_Definition(); generate function again, but this does not automatically force a re-build of the cell definition maps.

  • move bool cell_definitions_by_name_constructed variable external, to be able to force re-build the cell definitions maps from everywhere in the code base.

howto reset the cell definition after this change?

// reset cell definitions (core/PhysiCell_cell.cpp)
cell_defaults = PhysiCell::Cell_Definition();
PhysiCell::cell_definitions_by_index.clear();
PhysiCell::cell_definitions_by_index.push_back(&cell_defaults);
PhysiCell::cell_definitions_by_name_constructed = false;
PhysiCell::cell_definition_indices_by_name.clear();
PhysiCell::cell_definition_indices_by_type.clear();
PhysiCell::cell_definitions_by_name.clear();
PhysiCell::cell_definitions_by_type.clear();

@elmbeech
Copy link
Contributor Author

the only change is now to make the Boolean cell_definitions_by_name_constructed extern .

@elmbeech
Copy link
Contributor Author

this has resolved. Elmar

@elmbeech elmbeech closed this Oct 27, 2024
@elmbeech
Copy link
Contributor Author

elmbeech commented Oct 27, 2024

oh sorry no, this has not resolved. i closed the wrong repo.

Notes:

@elmbeech elmbeech reopened this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant