By calling a pure Python function each time OneDim::eval is called, we can catch KeyboardInterrupt exceptions and abort the 1D solver loop, returning control to Python. Partially addresses Issue 93.
7 lines
231 B
Python
7 lines
231 B
Python
def no_op(t):
|
|
"""
|
|
This function does nothing. It is used as an interrupt in the 1D solver
|
|
C++ loop where a pure Python function is needed in order for
|
|
KeyboardInterrupt events to be captured.
|
|
"""
|
|
return 0.0
|