Skip to content

Commit

Permalink
Merge pull request #350 from drbergman/fix-asym-div-save-event-trigger
Browse files Browse the repository at this point in the history
fix event trigger in asym div ex
  • Loading branch information
MathCancer authored Jan 20, 2025
2 parents 1801121 + 656fe08 commit 481d019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sample_projects/asymmetric_division/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int main( int argc, char* argv[] )
while( PhysiCell_globals.current_time < PhysiCell_settings.max_time + 0.1*diffusion_dt )
{
// save data if it's time.
if( fabs( PhysiCell_globals.current_time - PhysiCell_globals.next_full_save_time ) < 0.01 * diffusion_dt )
if( PhysiCell_globals.current_time > PhysiCell_globals.next_full_save_time - 0.5 * diffusion_dt )
{
display_simulation_status( std::cout );
if( PhysiCell_settings.enable_legacy_saves == true )
Expand All @@ -201,7 +201,7 @@ int main( int argc, char* argv[] )
}

// save SVG plot if it's time
if( fabs( PhysiCell_globals.current_time - PhysiCell_globals.next_SVG_save_time ) < 0.01 * diffusion_dt )
if( PhysiCell_globals.current_time > PhysiCell_globals.next_SVG_save_time - 0.5 * diffusion_dt )
{
if( PhysiCell_settings.enable_SVG_saves == true )
{
Expand Down

0 comments on commit 481d019

Please sign in to comment.