public class EventState extends Object
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.
Constructor and Description |
---|
EventState(EventHandler handlerIn,
double maxCheckIntervalIn,
double convergenceIn,
int maxIterationCountIn,
UnivariateSolver solverIn)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelStepAccepted()
Cancel stepAccepted call (does not cancel event).
|
boolean |
evaluateStep(double t,
double[] y)
Evaluate the impact of the proposed step on the event handler.
|
boolean |
evaluateStep(StepInterpolator interpolator)
Evaluate the impact of the proposed step on the event handler.
|
double |
getConvergence()
Get the convergence threshold for event localization.
|
EventHandler |
getEventHandler()
Get the underlying event handler.
|
double |
getEventTime()
Get the occurrence time of the event triggered in the current step.
|
double |
getMaxCheckInterval()
Get the maximal time interval between events handler checks.
|
int |
getMaxIterationCount()
Get the upper limit in the iteration count for event localization.
|
double |
getPreviousEventTime()
Get previous event time.
|
double |
getT0()
Getter for t0.
|
boolean |
isPendingReset()
Check if some reset is being triggered.
|
void |
reinitializeBegin(StepInterpolator interpolator)
Reinitialize the beginning of the step.
|
boolean |
removeDetector()
Check the current detector should be removed at the end of the current step
current step.
|
boolean |
reset(double t,
double[] y)
Let the event handler reset the state if it wants.
|
void |
stepAccepted(double t,
double[] y)
Acknowledge the fact the step has been accepted by the integrator.
|
boolean |
stop()
Check if the integration should be stopped at the end of the
current step.
|
void |
storeState(double t,
double[] y,
boolean forceUpdate)
Store event state with provided time and state.
|
public EventState(EventHandler handlerIn, double maxCheckIntervalIn, double convergenceIn, int maxIterationCountIn, UnivariateSolver solverIn)
handlerIn
- event handlermaxCheckIntervalIn
- maximal time interval between switching
function checks (this interval prevents missing sign changes in
case the integration steps becomes very large)convergenceIn
- convergence threshold in the event time searchmaxIterationCountIn
- upper limit of the iteration count in
the event time searchsolverIn
- Root-finding algorithm to use to detect state eventspublic EventHandler getEventHandler()
public double getMaxCheckInterval()
public double getConvergence()
public int getMaxIterationCount()
public void reinitializeBegin(StepInterpolator interpolator)
interpolator
- valid for the current stepMaxCountExceededException
- if the interpolator throws one because
the number of functions evaluations is exceededpublic boolean isPendingReset()
public void storeState(double t, double[] y, boolean forceUpdate)
t
- current timey
- current stateforceUpdate
- force update of event parameterspublic boolean evaluateStep(double t, double[] y)
t
- current timey
- current statepublic boolean evaluateStep(StepInterpolator interpolator)
interpolator
- step interpolator for the proposed stepMaxCountExceededException
- if the interpolator throws one because
the number of functions evaluations is exceededNoBracketingException
- if the event cannot be bracketedpublic double getEventTime()
public double getPreviousEventTime()
public void stepAccepted(double t, double[] y)
t
- value of the independent time variable at the
end of the stepy
- array containing the current value of the state vector
at the end of the steppublic void cancelStepAccepted()
public double getT0()
public boolean stop()
public boolean removeDetector()
public boolean reset(double t, double[] y)
t
- value of the independent time variable at the
beginning of the next stepy
- array were to put the desired state vector at the beginning
of the next stepCopyright © 2017 CNES. All rights reserved.