}
}
public void testSanityChecks() throws Exception {
final TestProblem3 pb = new TestProblem3(0.9);
double minStep = 0;
double maxStep = pb.getFinalTime() - pb.getInitialTime();
try {
FirstOrderIntegrator integ =
new HighamHall54Integrator(minStep, maxStep, new double[4], new double[4]);
integ.integrate(pb, pb.getInitialTime(), new double[6],
pb.getFinalTime(), new double[pb.getDimension()]);
fail("an exception should have been thrown");
} catch (IntegratorException ie) {
// expected behavior
}
try {
FirstOrderIntegrator integ =
new HighamHall54Integrator(minStep, maxStep, new double[4], new double[4]);
integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[6]);
fail("an exception should have been thrown");
} catch (IntegratorException ie) {
// expected behavior
}
try {
FirstOrderIntegrator integ =
new HighamHall54Integrator(minStep, maxStep, new double[2], new double[4]);
integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
fail("an exception should have been thrown");
} catch (IntegratorException ie) {
// expected behavior
}
try {
FirstOrderIntegrator integ =
new HighamHall54Integrator(minStep, maxStep, new double[4], new double[2]);
integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
fail("an exception should have been thrown");
} catch (IntegratorException ie) {
// expected behavior
}
try {
FirstOrderIntegrator integ =
new HighamHall54Integrator(minStep, maxStep, new double[4], new double[4]);
integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
pb.getInitialTime(), new double[pb.getDimension()]);
fail("an exception should have been thrown");
} catch (IntegratorException ie) {
// expected behavior
}