assertEquals("Dormand-Prince 8 (5, 3)", integ.getName());
}
public void testNoDenseOutput()
throws DerivativeException, IntegratorException {
TestProblem1 pb1 = new TestProblem1();
TestProblem1 pb2 = pb1.copy();
double minStep = 0.1 * (pb1.getFinalTime() - pb1.getInitialTime());
double maxStep = pb1.getFinalTime() - pb1.getInitialTime();
double scalAbsoluteTolerance = 1.0e-4;
double scalRelativeTolerance = 1.0e-4;
FirstOrderIntegrator integ = new DormandPrince853Integrator(minStep, maxStep,
scalAbsoluteTolerance,
scalRelativeTolerance);
integ.addStepHandler(DummyStepHandler.getInstance());
integ.integrate(pb1,
pb1.getInitialTime(), pb1.getInitialState(),
pb1.getFinalTime(), new double[pb1.getDimension()]);
int callsWithoutDenseOutput = pb1.getCalls();
assertEquals(integ.getEvaluations(), callsWithoutDenseOutput);
integ.addStepHandler(new InterpolatingStepHandler());
integ.integrate(pb2,
pb2.getInitialTime(), pb2.getInitialState(),
pb2.getFinalTime(), new double[pb2.getDimension()]);
int callsWithDenseOutput = pb2.getCalls();
assertEquals(integ.getEvaluations(), callsWithDenseOutput);
assertTrue(callsWithDenseOutput > callsWithoutDenseOutput);
}