These algorithms perform integration with stepsize control, which means the user does not specify the integration step but rather a tolerance on error. The error threshold is computed as
threshold_i = absTol_i + relTol_i * max (abs (ym), abs (ym+1))where absTol_i is the absolute tolerance for component i of the state vector and relTol_i is the relative tolerance for the same component. The user can also use only two scalar values absTol and relTol which will be used for all components.
Note that only the main part
of the state vector is used for stepsize control. The secondary parts of the state
vector are explicitly ignored for stepsize control.
If the estimated error for ym+1 is such that
sqrt((sum (errEst_i / threshold_i)^2 ) / n) < 1(where n is the main set dimension) then the step is accepted, otherwise the step is rejected and a new attempt is made with a new stepsize.
| Modifier and Type | Field and Description |
|---|---|
| private T | initialStep
User supplied initial step. |
| protected int | mainSetDimension
Main set dimension. |
| private T | maxStep
Maximal step. |
| private T | minStep
Minimal step. |
| protected double | scalAbsoluteTolerance
Allowed absolute scalar error. |
| protected double | scalRelativeTolerance
Allowed relative scalar error. |
| protected double[] | vecAbsoluteTolerance
Allowed absolute vectorial error. |
| protected double[] | vecRelativeTolerance
Allowed relative vectorial error. |
| Access | Constructor and Description |
|---|---|
| public | AdaptiveStepsizeFieldIntegrator(final Field<T>
field to which the time and state vector elements belong field, final String name of the method name, final double minimal step (sign is irrelevant, regardless of
integration direction, forward or backward), the last step can
be smaller than this minStep, final double maximal step (sign is irrelevant, regardless of
integration direction, forward or backward), the last step can
be smaller than this maxStep, final double allowed absolute error scalAbsoluteTolerance, final double allowed relative error scalRelativeTolerance)Build an integrator with the given stepsize bounds. |
| public | AdaptiveStepsizeFieldIntegrator(final Field<T>
field to which the time and state vector elements belong field, final String name of the method name, final double minimal step (sign is irrelevant, regardless of
integration direction, forward or backward), the last step can
be smaller than this minStep, final double maximal step (sign is irrelevant, regardless of
integration direction, forward or backward), the last step can
be smaller than this maxStep, final double[] allowed absolute error vecAbsoluteTolerance, final double[] allowed relative error vecRelativeTolerance)Build an integrator with the given stepsize bounds. |
| Modifier and Type | Method and Description |
|---|---|
| protected T | Returns: a bounded integration step (h if no bound is reach, or a bounded value)signed step h, final boolean forward integration indicator forward, final boolean if true, steps smaller than the minimal value
are silently increased up to this value, if false such small
steps generate an exception acceptSmall)Filter the integration step. |
| public T | |
| public T | |
| public T | Returns: first integration stepforward integration indicator forward, final int order of the method order, final T[] scaling vector for the state vector (can be shorter than state vector) scale, final FieldODEStateAndDerivative<T> state at integration start time state0, final FieldEquationsMapper<T> mapper for all the equations mapper)Initialize the integration step. |
| protected void | |
| protected void | sanityChecks(final FieldODEState<T>
set of differential equations eqn, final T target time for the integration t)Overrides org. Check the integration span. |
| public void | setInitialStepSize(final T
initial step size to use (must be positive even
for backward integration ; providing a negative value or a value
outside of the min/max step interval will lead the integrator to
ignore the value and compute the initial step size by itself) initialStepSize)Set the initial step size. |
| public void | setStepSizeControl(final double
minimal step (must be positive even for backward
integration), the last step can be smaller than this minimalStep, final double maximal step (must be positive even for backward
integration) maximalStep, final double allowed absolute error absoluteTolerance, final double allowed relative error relativeTolerance)Set the adaptive step size control parameters. |
| public void | setStepSizeControl(final double
minimal step (must be positive even for backward
integration), the last step can be smaller than this minimalStep, final double maximal step (must be positive even for backward
integration) maximalStep, final double[] allowed absolute error absoluteTolerance, final double[] allowed relative error relativeTolerance)Set the adaptive step size control parameters. |
| initialStep | back to summary |
|---|---|
| private T initialStep User supplied initial step. | |
| mainSetDimension | back to summary |
|---|---|
| protected int mainSetDimension Main set dimension. | |
| maxStep | back to summary |
|---|---|
| private T maxStep Maximal step. | |
| minStep | back to summary |
|---|---|
| private T minStep Minimal step. | |
| scalAbsoluteTolerance | back to summary |
|---|---|
| protected double scalAbsoluteTolerance Allowed absolute scalar error. | |
| scalRelativeTolerance | back to summary |
|---|---|
| protected double scalRelativeTolerance Allowed relative scalar error. | |
| vecAbsoluteTolerance | back to summary |
|---|---|
| protected double[] vecAbsoluteTolerance Allowed absolute vectorial error. | |
| vecRelativeTolerance | back to summary |
|---|---|
| protected double[] vecRelativeTolerance Allowed relative vectorial error. | |
| AdaptiveStepsizeFieldIntegrator | back to summary |
|---|---|
| public AdaptiveStepsizeFieldIntegrator(final Field<T> field, final String name, final double minStep, final double maxStep, final double scalAbsoluteTolerance, final double scalRelativeTolerance) Build an integrator with the given stepsize bounds. The default step handler does nothing.
| |
| AdaptiveStepsizeFieldIntegrator | back to summary |
|---|---|
| public AdaptiveStepsizeFieldIntegrator(final Field<T> field, final String name, final double minStep, final double maxStep, final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) Build an integrator with the given stepsize bounds. The default step handler does nothing.
| |
| filterStep | back to summary |
|---|---|
| protected T filterStep(final T h, final boolean forward, final boolean acceptSmall) throws NumberIsTooSmallException Filter the integration step.
| |
| getMaxStep | back to summary |
|---|---|
| public T getMaxStep() Get the maximal step.
| |
| getMinStep | back to summary |
|---|---|
| public T getMinStep() Get the minimal step.
| |
| initializeStep | back to summary |
|---|---|
| public T initializeStep(final boolean forward, final int order, final T[] scale, final FieldODEStateAndDerivative<T> state0, final FieldEquationsMapper<T> mapper) throws MaxCountExceededException, DimensionMismatchException Initialize the integration step.
| |
| resetInternalState | back to summary |
|---|---|
| protected void resetInternalState() Reset internal state to dummy values. | |
| sanityChecks | back to summary |
|---|---|
| protected void sanityChecks(final FieldODEState<T> eqn, final T t) throws DimensionMismatchException, NumberIsTooSmallException Overrides org. Doc from org. Check the integration span.
| |
| setInitialStepSize | back to summary |
|---|---|
| public void setInitialStepSize(final T initialStepSize) Set the initial step size. This method allows the user to specify an initial positive step size instead of letting the integrator guess it by itself. If this method is not called before integration is started, the initial step size will be estimated by the integrator.
| |
| setStepSizeControl | back to summary |
|---|---|
| public void setStepSizeControl(final double minimalStep, final double maximalStep, final double absoluteTolerance, final double relativeTolerance) Set the adaptive step size control parameters.
A side effect of this method is to also reset the initial
step so it will be automatically computed by the integrator
if
| |
| setStepSizeControl | back to summary |
|---|---|
| public void setStepSizeControl(final double minimalStep, final double maximalStep, final double[] absoluteTolerance, final double[] relativeTolerance) Set the adaptive step size control parameters.
A side effect of this method is to also reset the initial
step so it will be automatically computed by the integrator
if
| |