void CalcFunct // a function that codes the analytic expression... // ...of the forcing function of the sample problem // it is called only by the function NumericJacob... // ...to estimate the jacobian matrix by finite differences (double x_ [], // argument of the sample forcing function int dim, // dimension of the sample problem double F []); // value of of the sample forcing function at x_ [] void CalcFunct (double x_ [], int dim, double F []) { double beta1 = 1.0e+3; double beta2 = 1.0e-3; if (dim != 2) abort (); // sample problem // dx0 / dt = f0 = (1 - x0) - beta1 x0 x1 // dx1 / dt = f1 = -beta2 x0 x1 F [0] = (1 - x_ [0]) - beta1 * x_ [1] * x_ [0]; F [1] = -(x_ [1] * x_ [0]) * beta2; }