File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 44
44
config.py
45
45
matplotlibrc
46
46
* .pickle
47
+ * .sav
47
48
48
49
# ideas
49
50
ideas /
Original file line number Diff line number Diff line change @@ -408,6 +408,13 @@ def integer_bisect():
408
408
409
409
# Find the exact time at which the event was triggered
410
410
t_event , y_event = find_t_event (dense_step_sol , "exact" )
411
+ # If this returns None, no event was crossed in dense_step_sol. This can happen
412
+ # if the event crossing was right at the end of the interval in the coarse
413
+ # solution. In this case, return the t and y from the end of the interval
414
+ # (i.e. next point in the coarse solution)
415
+ if y_event is None :
416
+ t_event = coarse_solution .t [event_idx_lower + 1 ]
417
+ y_event = coarse_solution .y [:, event_idx_lower + 1 ].full ().flatten ()
411
418
412
419
# Return solution truncated at the first coarse event time
413
420
# Also assign t_event
You can’t perform that action at this time.
0 commit comments