public abstract class RungeKuttaIntegrator extends AbstractIntegrator implements ButcherArrayProvider
These methods are explicit Runge-Kutta methods, their Butcher arrays are as follows :
0 | c2 | a21 c3 | a31 a32 ... | ... cs | as1 as2 ... ass-1 |-------------------------- | b1 b2 ... bs-1 bs
Modifier | Constructor and Description |
---|---|
protected |
RungeKuttaIntegrator(String name,
double step)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract org.hipparchus.ode.nonstiff.RungeKuttaStateInterpolator |
createInterpolator(boolean forward,
double[][] yDotK,
ODEStateAndDerivative globalPreviousState,
ODEStateAndDerivative globalCurrentState,
EquationsMapper mapper)
Create an interpolator.
|
ODEStateAndDerivative |
integrate(ExpandableODE equations,
ODEState initialState,
double finalTime)
Integrate the differential equations up to the given time.
|
double[] |
singleStep(OrdinaryDifferentialEquation equations,
double t0,
double[] y0,
double t)
Fast computation of a single step of ODE integration.
|
acceptStep, addEventHandler, addEventHandler, addStepHandler, clearEventHandlers, clearStepHandlers, computeDerivatives, getCurrentSignedStepsize, getCurrentStepStart, getEquations, getEvaluations, getEvaluationsCounter, getEventHandlers, getMaxEvaluations, getName, getStepHandlers, getStepSize, getStepStart, initIntegration, isLastStep, resetOccurred, sanityChecks, setIsLastStep, setMaxEvaluations, setStateInitialized, setStepSize, setStepStart
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getA, getB, getC
integrate, integrate
protected RungeKuttaIntegrator(String name, double step)
name
- name of the methodstep
- integration stepprotected abstract org.hipparchus.ode.nonstiff.RungeKuttaStateInterpolator createInterpolator(boolean forward, double[][] yDotK, ODEStateAndDerivative globalPreviousState, ODEStateAndDerivative globalCurrentState, EquationsMapper mapper)
forward
- integration direction indicatoryDotK
- slopes at the intermediate pointsglobalPreviousState
- start of the global stepglobalCurrentState
- end of the global stepmapper
- equations mapper for the all equationspublic ODEStateAndDerivative integrate(ExpandableODE equations, ODEState initialState, double finalTime) throws MathIllegalArgumentException, MathIllegalStateException
This method solves an Initial Value Problem (IVP).
Since this method stores some internal state variables made
available in its public interface during integration (ODEIntegrator.getCurrentSignedStepsize()
), it is not thread-safe.
integrate
in interface ODEIntegrator
equations
- differential equations to integrateinitialState
- initial state (time, primary and secondary state vectors)finalTime
- target time for the integration
(can be set to a value smaller than t0
for backward integration)finalTime
if
integration reached its target, but may be different if some ODEEventHandler
stops it at some point.MathIllegalArgumentException
- if integration step is too smallMathIllegalStateException
- if the number of functions evaluations is exceededpublic double[] singleStep(OrdinaryDifferentialEquation equations, double t0, double[] y0, double t)
This method is intended for the limited use case of very fast computation of only one step without using any of the rich features of general integrators that may take some time to set up (i.e. no step handlers, no events handlers, no additional states, no interpolators, no error control, no evaluations count, no sanity checks ...). It handles the strict minimum of computation, so it can be embedded in outer loops.
This method is not used at all by the integrate(ExpandableODE, ODEState, double)
method. It also completely ignores the step set at construction time, and
uses only a single step to go from t0
to t
.
As this method does not use any of the state-dependent features of the integrator, it should be reasonably thread-safe if and only if the provided differential equations are themselves thread-safe.
equations
- differential equations to integratet0
- initial timey0
- initial value of the state vector at t0t
- target time for the integration
(can be set to a value smaller than t0
for backward integration)t
Copyright © 2016 Hipparchus.org. All rights reserved.