ibl.ibl_method.TermEvent
- class ibl.ibl_method.TermEvent
Bases:
ABCBase class for a termination event for IBL solver.
The two abstract methods that have to be implemented are event_info and _call_impl for a valid termination event for use in an
IBLMethodderived class. Classes derived from this class can either be used within an IBL implementation (i.e., an implementation specific reason why the integration should terminate) or as a parameter into the solve method (i.e., the user has a particular reason for the integration to terminate).This class needs to return a float when called that changes sign when the integration should terminate. See the solve_ivp and related documentation for details.
- terminal
True if event should terminate integration
- Type:
bool
- __init__()
- Return type:
None
Methods
__init__()Return information about the purpose of this event.
- abstract event_info()
Return information about the purpose of this event.
This is used to provide feedback as to what caused the integration to terminate and any other helpful information.
- Returns:
TermReason – Value indicating reason this event would terminate integration.
str – Extra information associated with reason for termination.
- Return type:
Tuple[TermReason, str]
Notes
The value TermReason.UNKNOWN should be used for reasons that do not have an existing reason. For these termination situations the message can provide more details.