PhysiCell icon indicating copy to clipboard operation
PhysiCell copied to clipboard

enable cell definition reset.

Open elmbeech opened this issue 7 months ago • 3 comments

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 avatar Jul 14 '24 21:07 elmbeech