Class AdamsMoultonFieldIntegrator.Corrector
- java.lang.Object
-
- org.apache.commons.math3.ode.nonstiff.AdamsMoultonFieldIntegrator.Corrector
-
- All Implemented Interfaces:
FieldMatrixPreservingVisitor<T>
- Enclosing class:
- AdamsMoultonFieldIntegrator<T extends RealFieldElement<T>>
private class AdamsMoultonFieldIntegrator.Corrector extends java.lang.Object implements FieldMatrixPreservingVisitor<T>
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
end()
End visiting the Nordsieck vector.void
start(int rows, int columns, int startRow, int endRow, int startColumn, int endColumn)
Start visiting a matrix.void
visit(int row, int column, T value)
Visit one matrix entry.
-
-
-
Field Detail
-
previous
private final T extends RealFieldElement<T>[] previous
Previous state.
-
scaled
private final T extends RealFieldElement<T>[] scaled
Current scaled first derivative.
-
before
private final T extends RealFieldElement<T>[] before
Current state before correction.
-
after
private final T extends RealFieldElement<T>[] after
Current state after correction.
-
-
Method Detail
-
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 interfaceFieldMatrixPreservingVisitor<T extends RealFieldElement<T>>
- 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, T value)
Visit one matrix entry.- Specified by:
visit
in interfaceFieldMatrixPreservingVisitor<T extends RealFieldElement<T>>
- Parameters:
row
- row index of the entrycolumn
- column index of the entryvalue
- current value of the entry
-
end
public T 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 interfaceFieldMatrixPreservingVisitor<T extends RealFieldElement<T>>
- Returns:
- the normalized correction, if greater than 1, the step must be rejected
-
-