Fix/heberlr/pr neighbor list for non movable cells - #430
Conversation
…ressure without updating velocity
| if( pCell->is_movable == false ) | ||
| { | ||
| pCell->velocity = {0.0, 0.0, 0.0}; | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
This differs from #410. @heberlr made a change in core/PhysiCell_cell.cpp.
It looks like the choice here is to let the axpy( &velocity , temp_r , displacement ); update the velocity field. Then in this function, sets that velocity to 0 and short circuits the motility updates.
So I think this does the same thing for the most part:
add_potentialswill now update the cell'svelocity. Heber's version won't.- This version skips the motility vector update and sets
velocityto 0; Heber's does the motility vector update. Looking more closely, I think it is technically possible for a cell to haveis_motile==truebutis_movable==false. So this particular PR better protects against that.
There was a problem hiding this comment.
Thanks @vincent-noel! I believe you got the first commits where I used this approach, but later I changed it to do exactly what @drbergman mentioned (see commit 7ffa1a6: 7ffa1a6), avoiding the extra calculation.
There was a problem hiding this comment.
OK, so let's put that guard inside add_potentials back and then we'll be ready to merge once we've updated the test suite. Sound good @vincent-noel ?
|
Thanks for catching this @drbergman and @heberlr. |
New pr for #410