Since the scaled and Nordiseck arrays are shared with the caller, this method has the side effect of rescaling this arrays in the caller too.
236237238239240241242243244245246
start(t0, y, t); interpolator.reinitialize(stepStart, stepSize, scaled, nordsieck); interpolator.storeTime(stepStart); double hNew = stepSize; interpolator.rescale(hNew); isLastStep = false; do { double error = 10;
268269270271272273274275276277278
if (error >= 1.0) { // reject the step and attempt to reduce error by stepsize control final double factor = computeStepGrowShrinkFactor(error); hNew = filterStep(stepSize * factor, forward, false); interpolator.rescale(hNew); } } // evaluate a final estimate of the derivative (second E in the PECE sequence) final double stepEnd = stepStart + stepSize;
319320321322323324325326327328329
final boolean filteredNextIsLast = forward ? (filteredNextT >= t) : (filteredNextT <= t); if (filteredNextIsLast) { hNew = t - stepStart; } interpolator.rescale(hNew); } } while (!isLastStep); final double stopTime = stepStart;
218219220221222223224225226227228
interpolator.storeTime(stepStart); final int lastRow = nordsieck.getRowDimension() - 1; // reuse the step that was chosen by the starter integrator double hNew = stepSize; interpolator.rescale(hNew); // main integration loop isLastStep = false; do {
245246247248249250251252253254255
if (error >= 1.0) { // reject the step and attempt to reduce error by stepsize control final double factor = computeStepGrowShrinkFactor(error); hNew = filterStep(stepSize * factor, forward, false); interpolator.rescale(hNew); } } // predict a first estimate of the state at step end
300301302303304305306307308309310
final boolean filteredNextIsLast = forward ? (filteredNextT >= t) : (filteredNextT <= t); if (filteredNextIsLast) { hNew = t - stepStart; } interpolator.rescale(hNew); } } while (!isLastStep);