Package org.apache.commons.math3.ode
Class MultistepFieldIntegrator.FieldNordsieckInitializer
java.lang.Object
org.apache.commons.math3.ode.MultistepFieldIntegrator.FieldNordsieckInitializer
- All Implemented Interfaces:
FieldStepHandler<T>
- Enclosing class:
MultistepFieldIntegrator<T extends RealFieldElement<T>>
private class MultistepFieldIntegrator.FieldNordsieckInitializer
extends Object
implements FieldStepHandler<T>
Specialized step handler storing the first step.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Steps counter.private final FieldEquationsMapper
<T> Equation mapper.private FieldODEStateAndDerivative
<T> Saved start.private final T[]
First steps times.private final T[][]
First steps states.private final T[][]
First steps derivatives. -
Constructor Summary
ConstructorsConstructorDescriptionFieldNordsieckInitializer
(FieldEquationsMapper<T> mapper, int nbStartPoints) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleStep
(FieldStepInterpolator<T> interpolator, boolean isLast) Handle the last accepted stepvoid
init
(FieldODEStateAndDerivative<T> initialState, T finalTime) Initialize step handler at the start of an ODE integration.
-
Field Details
-
mapper
Equation mapper. -
count
private int countSteps counter. -
savedStart
Saved start. -
t
First steps times. -
y
First steps states. -
yDot
First steps derivatives.
-
-
Constructor Details
-
FieldNordsieckInitializer
FieldNordsieckInitializer(FieldEquationsMapper<T> mapper, int nbStartPoints) Simple constructor.- Parameters:
mapper
- equation mappernbStartPoints
- number of start points (including the initial point)
-
-
Method Details
-
handleStep
public void handleStep(FieldStepInterpolator<T> interpolator, boolean isLast) throws MaxCountExceededException Handle the last accepted step- Specified by:
handleStep
in interfaceFieldStepHandler<T extends RealFieldElement<T>>
- Parameters:
interpolator
- interpolator for the last accepted step. For efficiency purposes, the various integrators reuse the same object on each call, so if the instance wants to keep it across all calls (for example to provide at the end of the integration a continuous model valid throughout the integration range, as theContinuousOutputModel
class does), it should build a local copy using the clone method of the interpolator and store this copy. Keeping only a reference to the interpolator and reusing it will result in unpredictable behavior (potentially crashing the application).isLast
- true if the step is the last one- Throws:
MaxCountExceededException
- if the interpolator throws one because the number of functions evaluations is exceeded
-
init
Initialize step handler at the start of an ODE integration.This method is called once at the start of the integration. It may be used by the step handler to initialize some internal data if needed.
- Specified by:
init
in interfaceFieldStepHandler<T extends RealFieldElement<T>>
- Parameters:
initialState
- initial time, state vector and derivativefinalTime
- target time for the integration
-