PhysiCell
PhysiCell copied to clipboard
enable cell definition reset.
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();