throws MaxCountExceededException, DimensionMismatchException,
NumberIsTooSmallException, NoBracketingException,
UnknownParameterException, MismatchedEquations {
AbstractIntegrator integ =
new DormandPrince54Integrator(1.0e-8, 100.0, new double[] { 1.0e-10, 1.0e-10 }, new double[] { 1.0e-10, 1.0e-10 });
double[] y = new double[] { 0.0, 1.0 };
ParameterizedCircle pcircle = new ParameterizedCircle(y, 1.0, 1.0, 0.1);
double hP = 1.0e-12;
double hY = 1.0e-12;
JacobianMatrices jacob = new JacobianMatrices(pcircle, new double[] { hY, hY },
ParameterizedCircle.CX, ParameterizedCircle.CY,
ParameterizedCircle.OMEGA);
jacob.setParameterizedODE(pcircle);
jacob.setParameterStep(ParameterizedCircle.CX, hP);
jacob.setParameterStep(ParameterizedCircle.CY, hP);
jacob.setParameterStep(ParameterizedCircle.OMEGA, hP);
jacob.setInitialMainStateJacobian(pcircle.exactDyDy0(0));
jacob.setInitialParameterJacobian(ParameterizedCircle.CX, pcircle.exactDyDcx(0));
jacob.setInitialParameterJacobian(ParameterizedCircle.CY, pcircle.exactDyDcy(0));
jacob.setInitialParameterJacobian(ParameterizedCircle.OMEGA, pcircle.exactDyDom(0));
ExpandableStatefulODE efode = new ExpandableStatefulODE(pcircle);
efode.setTime(0);
efode.setPrimaryState(y);
jacob.registerVariationalEquations(efode);
integ.setMaxEvaluations(50000);
double t = 18 * FastMath.PI;
integ.integrate(efode, t);
y = efode.getPrimaryState();
for (int i = 0; i < y.length; ++i) {
Assert.assertEquals(pcircle.exactY(t)[i], y[i], 1.0e-9);
}