Class AdamsMoultonIntegrator.Corrector
java.lang.Object
org.apache.commons.math3.ode.nonstiff.AdamsMoultonIntegrator.Corrector
- All Implemented Interfaces:
RealMatrixPreservingVisitor
- Enclosing class:
AdamsMoultonIntegrator
private class AdamsMoultonIntegrator.Corrector
extends Object
implements RealMatrixPreservingVisitor
Corrector for current state in Adams-Moulton method.
This visitor implements the Taylor series formula:
Yn+1 = yn + s1(n+1) + [ -1 +1 -1 +1 ... ±1 ] rn+1
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCorrector
(double[] previous, double[] scaled, double[] state) Simple constructor. -
Method Summary
-
Field Details
-
previous
private final double[] previousPrevious state. -
scaled
private final double[] scaledCurrent scaled first derivative. -
before
private final double[] beforeCurrent state before correction. -
after
private final double[] afterCurrent state after correction.
-
-
Constructor Details
-
Corrector
Corrector(double[] previous, double[] scaled, double[] state) Simple constructor.- Parameters:
previous
- previous statescaled
- current scaled first derivativestate
- state to correct (will be overwritten after visit)
-
-
Method Details
-
start
public void start(int rows, int columns, int startRow, int endRow, int startColumn, int endColumn) Start visiting a matrix.This method is called once before any entry of the matrix is visited.
- Specified by:
start
in interfaceRealMatrixPreservingVisitor
- Parameters:
rows
- number of rows of the matrixcolumns
- number of columns of the matrixstartRow
- Initial row indexendRow
- Final row index (inclusive)startColumn
- Initial column indexendColumn
- Final column index (inclusive)
-
visit
public void visit(int row, int column, double value) Visit one matrix entry.- Specified by:
visit
in interfaceRealMatrixPreservingVisitor
- Parameters:
row
- row index of the entrycolumn
- column index of the entryvalue
- current value of the entry
-
end
public double end()End visiting the Nordsieck vector.The correction is used to control stepsize. So its amplitude is considered to be an error, which must be normalized according to error control settings. If the normalized value is greater than 1, the correction was too large and the step must be rejected.
- Specified by:
end
in interfaceRealMatrixPreservingVisitor
- Returns:
- the normalized correction, if greater than 1, the step must be rejected
-