public class RungeKuttaCashKarp45Integrator extends RungeKuttaAdaptiveStepIntegrator
Modifier | Constructor and Description |
---|---|
|
RungeKuttaCashKarp45Integrator()
Initializes a new instance.
|
|
RungeKuttaCashKarp45Integrator(DependentVariableDerivatives system,
double initialStepSize)
Initializes a new instance based on the given system of equations and initial step size.
|
protected |
RungeKuttaCashKarp45Integrator(RungeKuttaCashKarp45Integrator existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
adaptStep()
This method updates the
CurrentStepSize (get ) to account for error in the state and its derivatives. |
Object |
clone(CopyContext context)
Create a copy of this integrator.
|
double |
getAbsoluteTolerance()
Gets the tolerance which provides a baseline for the error control.
|
double |
getRelativeTolerance()
Gets the tolerance which provides a relative weight for the numerical error
based on the dependent variables.
|
void |
initialize(double x,
double[] y)
Initialize the integrator's initial independent and dependent variables and reset the integration parameters.
|
void |
setAbsoluteTolerance(double value)
Sets the tolerance which provides a baseline for the error control.
|
void |
setRelativeTolerance(double value)
Sets the tolerance which provides a relative weight for the numerical error
based on the dependent variables.
|
getTableau, reintegrate, setTableau
adjustStep, boundAndTruncateStepSize, getAdaptiveWeights, getCurrentStepSize, getIterations, getMaximumIterations, getMaximumStepSize, getMinimumStepSize, getStepDeflationExponent, getStepDeflationFactor, getStepInflationExponent, getStepInflationFactor, getStepSizeBehavior, getStepTruncationOrder, integrate, integrate, setAdaptiveWeights, setCurrentStepSize, setIterations, setMaximumIterations, setMaximumStepSize, setMinimumStepSize, setStepDeflationExponent, setStepDeflationFactor, setStepInflationExponent, setStepInflationFactor, setStepSizeBehavior, setStepTruncationOrder
getDimension, getDirection, getFinalDependentVariableValues, getFinalIndependentVariableValue, getInitialDependentVariableValues, getInitialIndependentVariableValue, getInitialStepSize, getIsThreadSafe, getPreviousStepSize, getStepSizeInformation, getSystemOfEquations, setDirection, setFinalDependentVariableValues, setFinalIndependentVariableValue, setInitialDependentVariableValues, setInitialIndependentVariableValue, setInitialStepSize, setStepSizeInformation, setSystemOfEquations, startNextStep
public RungeKuttaCashKarp45Integrator()
public RungeKuttaCashKarp45Integrator(DependentVariableDerivatives system, double initialStepSize)
system
- The system of equations that define the derivatives for the dependent variables.initialStepSize
- The initial size of the integration step.protected RungeKuttaCashKarp45Integrator(@Nonnull RungeKuttaCashKarp45Integrator existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
- The existing instance to copy.context
- A CopyContext
that controls the depth of the copy.ArgumentNullException
- Thrown when existingInstance
or context
is null
.public Object clone(CopyContext context)
clone
in interface ICloneWithContext
clone
in class NumericalIntegrator
context
- The context in which to create the copy.public final double getAbsoluteTolerance()
Constants.Epsilon10
.public final void setAbsoluteTolerance(double value)
Constants.Epsilon10
.public final double getRelativeTolerance()
Constants.Epsilon13
.public final void setRelativeTolerance(double value)
Constants.Epsilon13
.public void initialize(double x, double[] y)
initialize
in class RungeKuttaAdaptiveStepIntegrator
x
- The value of the initial independent variable.y
- The values for the initial dependent variables.public boolean adaptStep()
CurrentStepSize
(get
) to account for error in the state and its derivatives.
It returns true if the integrator should reintegrate with the updated step size or false if the integrator
should continue to the next integration step (potentially with a different step size).adaptStep
in class AdaptiveNumericalIntegrator