diff --git a/core/PhysiCell_cell_container.cpp b/core/PhysiCell_cell_container.cpp index 0c5850b1d..a31302c1f 100644 --- a/core/PhysiCell_cell_container.cpp +++ b/core/PhysiCell_cell_container.cpp @@ -240,7 +240,7 @@ void Cell_Container::update_all_cells(double t, double phenotype_dt_ , double me for( int i=0; i < (*all_cells).size(); i++ ) { Cell* pC = (*all_cells)[i]; - if( pC->functions.update_velocity && pC->is_out_of_domain == false && pC->is_movable ) + if( pC->functions.update_velocity && pC->is_out_of_domain == false ) { pC->functions.update_velocity( pC,pC->phenotype,time_since_last_mechanics ); } } diff --git a/core/PhysiCell_standard_models.cpp b/core/PhysiCell_standard_models.cpp index 4d170a406..5661ea6b0 100644 --- a/core/PhysiCell_standard_models.cpp +++ b/core/PhysiCell_standard_models.cpp @@ -645,7 +645,14 @@ void standard_update_cell_velocity( Cell* pCell, Phenotype& phenotype, double dt pCell->add_potentials(*neighbor); } } - + + // Set the velocity to zero if the cell is not movable - This allows non-movable cells have neighbors list and simple_pressure calculated, but not move. + if( pCell->is_movable == false ) + { + pCell->velocity = {0.0, 0.0, 0.0}; + return; + } + pCell->update_motility_vector(dt); pCell->velocity += phenotype.motility.motility_vector; diff --git a/modules/PhysiCell_settings.cpp b/modules/PhysiCell_settings.cpp index a588383d1..6af2da0ee 100644 --- a/modules/PhysiCell_settings.cpp +++ b/modules/PhysiCell_settings.cpp @@ -378,7 +378,7 @@ bool create_directory(const std::string &path) #else bool create_directory(const std::string &path) { -#if defined(__MINGW32__) || defined(__MINGW64__) +#if defined(_WIN32) bool success = mkdir(path.c_str()) == 0; #else bool success = mkdir(path.c_str(), 0755) == 0;