event handler during integration steps.
Each time the integrator proposes a step, the event handler switching function should be checked. This class handles the state of one handler during one integration step, with references to the state at the end of the preceding step. This information is used to decide if the handler should trigger an event or not during the proposed step.
| Modifier and Type | Field and Description |
|---|---|
| private final T | convergence
Convergence threshold for event localization. |
| private boolean | forward
Integration direction. |
| private T | g0
Value of the events handler at the beginning of the step. |
| private boolean | g0Positive
Simulated sign of g0 (we cheat when crossing events). |
| private final FieldEventHandler | handler
Event handler. |
| private boolean | increasing
Variation direction around pending event. |
| private final double | maxCheckInterval
Maximal time interval between events handler checks. |
| private final int | maxIterationCount
Upper limit in the iteration count for event localization. |
| private Action | nextAction
Next action indicator. |
| private boolean | pendingEvent
Indicator of event expected during the step. |
| private T | pendingEventTime
Occurrence time of the pending event. |
| private T | previousEventTime
Occurrence time of the previous event. |
| private final BracketedRealFieldUnivariateSolver | solver
Root-finding algorithm to use to detect state events. |
| private T | t0
Time at the beginning of the step. |
| Access | Constructor and Description |
|---|---|
| public | FieldEventState(final FieldEventHandler<T>
event handler handler, final double maximal time interval between switching
function checks (this interval prevents missing sign changes in
case the integration steps becomes very large) maxCheckInterval, final T convergence threshold in the event time search convergence, final int upper limit of the iteration count in
the event time search maxIterationCount, final BracketedRealFieldUnivariateSolver<T> Root-finding algorithm to use to detect state events solver)Simple constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the event handler triggers an event before the end of the proposed stepstep interpolator for the proposed step interpolator)Evaluate the impact of the proposed step on the event handler. |
| public T | Returns: convergence threshold for event localizationGet the convergence threshold for event localization. |
| public FieldEventHandler | |
| public T | Returns: occurrence time of the event triggered in the current step or infinity if no events are triggeredGet the occurrence time of the event triggered in the current step. |
| public double | Returns: maximal time interval between events handler checksGet the maximal time interval between events handler checks. |
| public int | Returns: upper limit in the iteration count for event localizationGet the upper limit in the iteration count for event localization. |
| public void | reinitializeBegin(final FieldStepInterpolator<T>
valid for the current step interpolator)Reinitialize the beginning of the step. |
| public FieldODEState | Returns: reset state (may by the same as initial state if only derivatives should be reset), or null if nothing is resetstate at the beginning of the next step state)Let the event handler reset the state if it wants. |
| public void | stepAccepted(final FieldODEStateAndDerivative<T>
state at the end of the step state)Acknowledge the fact the step has been accepted by the integrator. |
| public boolean | Returns: true if the integration should be stoppedCheck if the integration should be stopped at the end of the current step. |
| convergence | back to summary |
|---|---|
| private final T convergence Convergence threshold for event localization. | |
| forward | back to summary |
|---|---|
| private boolean forward Integration direction. | |
| g0 | back to summary |
|---|---|
| private T g0 Value of the events handler at the beginning of the step. | |
| g0Positive | back to summary |
|---|---|
| private boolean g0Positive Simulated sign of g0 (we cheat when crossing events). | |
| handler | back to summary |
|---|---|
| private final FieldEventHandler<T> handler Event handler. | |
| increasing | back to summary |
|---|---|
| private boolean increasing Variation direction around pending event. (this is considered with respect to the integration direction) | |
| maxCheckInterval | back to summary |
|---|---|
| private final double maxCheckInterval Maximal time interval between events handler checks. | |
| maxIterationCount | back to summary |
|---|---|
| private final int maxIterationCount Upper limit in the iteration count for event localization. | |
| nextAction | back to summary |
|---|---|
| private Action nextAction Next action indicator. | |
| pendingEvent | back to summary |
|---|---|
| private boolean pendingEvent Indicator of event expected during the step. | |
| pendingEventTime | back to summary |
|---|---|
| private T pendingEventTime Occurrence time of the pending event. | |
| previousEventTime | back to summary |
|---|---|
| private T previousEventTime Occurrence time of the previous event. | |
| solver | back to summary |
|---|---|
| private final BracketedRealFieldUnivariateSolver<T> solver Root-finding algorithm to use to detect state events. | |
| t0 | back to summary |
|---|---|
| private T t0 Time at the beginning of the step. | |
| FieldEventState | back to summary |
|---|---|
| public FieldEventState(final FieldEventHandler<T> handler, final double maxCheckInterval, final T convergence, final int maxIterationCount, final BracketedRealFieldUnivariateSolver<T> solver) Simple constructor.
| |
| evaluateStep | back to summary |
|---|---|
| public boolean evaluateStep(final FieldStepInterpolator<T> interpolator) throws MaxCountExceededException, NoBracketingException Evaluate the impact of the proposed step on the event handler.
| |
| getConvergence | back to summary |
|---|---|
| public T getConvergence() Get the convergence threshold for event localization.
| |
| getEventHandler | back to summary |
|---|---|
| public FieldEventHandler Get the underlying event handler.
| |
| getEventTime | back to summary |
|---|---|
| public T getEventTime() Get the occurrence time of the event triggered in the current step.
| |
| getMaxCheckInterval | back to summary |
|---|---|
| public double getMaxCheckInterval() Get the maximal time interval between events handler checks.
| |
| getMaxIterationCount | back to summary |
|---|---|
| public int getMaxIterationCount() Get the upper limit in the iteration count for event localization.
| |
| reinitializeBegin | back to summary |
|---|---|
| public void reinitializeBegin(final FieldStepInterpolator<T> interpolator) throws MaxCountExceededException Reinitialize the beginning of the step.
| |
| reset | back to summary |
|---|---|
| public FieldODEState Let the event handler reset the state if it wants.
| |
| stepAccepted | back to summary |
|---|---|
| public void stepAccepted(final FieldODEStateAndDerivative<T> state) Acknowledge the fact the step has been accepted by the integrator.
| |
| stop | back to summary |
|---|---|
| public boolean stop() Check if the integration should be stopped at the end of the current step.
| |