PhysiCell icon indicating copy to clipboard operation
PhysiCell copied to clipboard

suspicious that custom data conserved attribute not being set

Open rheiland opened this issue 1 year ago • 2 comments
trafficstars

https://github.com/MathCancer/PhysiCell/blob/master/core/PhysiCell_cell.cpp#L3039

rheiland avatar Feb 09 '24 02:02 rheiland

Thanks!

conserved is by default false. That is, it is treated as a heritable parameter, and any daughter cells inherit the same value. (unlike a conserved quantity, which is split between daughter cells.)

When parsing XML, if the XML attribute isn't found, pugi::xml_node.attribute(string).as_bool() returns false, so a false would be overwritten with a false (no problem).

If the attribute is found, then false is overwritten by false or true, and both of these are no problem.

MathCancer avatar Feb 10 '24 20:02 MathCancer

Now I think I better understand your comment, and I think you're 100% right.

NOw I understand that 3039 is not the bug, but instead that conserved isn't used at https://github.com/MathCancer/PhysiCell/blob/master/core/PhysiCell_cell.cpp#L3077

MathCancer avatar Feb 12 '24 15:02 MathCancer