gsl/wrk.patch

90 lines
2.4 KiB
Diff
Raw Normal View History

2013-01-09 09:55:45 +00:00
diff -up wrk/ode-initval2/msbdf.c.wrk wrk/ode-initval2/msbdf.c
diff -up wrk/ode-initval2/test.c.wrk wrk/ode-initval2/test.c
--- wrk/ode-initval2/test.c.wrk 2013-01-09 10:48:22.051415928 +0100
2013-01-09 13:52:05 +00:00
+++ wrk/ode-initval2/test.c 2013-01-09 14:52:00.844469784 +0100
2013-01-09 13:29:02 +00:00
@@ -1264,10 +1264,17 @@ sys_driver (const gsl_odeiv2_step_type *
2013-01-09 12:46:19 +00:00
nfe = 0;
nje = 0;
2013-01-09 12:41:51 +00:00
2013-01-09 13:24:23 +00:00
+ int poc=0;
2013-01-09 12:41:51 +00:00
while (t < t1)
{
s = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, sys, &t, t1, &h, y);
2013-01-09 13:24:23 +00:00
+ printf("krok %d:", ++poc);
2013-01-09 13:29:02 +00:00
+ int k;
+ for (k=0; k<15; ++k) {
2013-01-09 13:52:05 +00:00
+ printf(" %uld",(*(unsigned long int *)(&(y[k]))));
2013-01-09 13:24:23 +00:00
+ }
2013-01-09 13:46:46 +00:00
+ printf("\n");
2013-01-09 12:41:51 +00:00
#ifdef DEBUG
2013-01-09 13:24:23 +00:00
printf ("%.5e %.5e %.5e %d\n", t, y[0], y[1],
gsl_odeiv2_step_order (d->s));
2013-01-09 13:29:02 +00:00
@@ -1959,7 +1966,7 @@ test_extreme_problems (void)
2013-01-09 12:30:24 +00:00
/* Loop over problems */
- for (p = 0; p < CONST_EXTREME_NPROB; p++)
+ for (p = 2; p < CONST_EXTREME_NPROB; p++)
{
/* Initialize */
2013-01-09 13:29:02 +00:00
@@ -2001,12 +2008,13 @@ test_extreme_problems (void)
2013-01-09 12:34:53 +00:00
2013-01-09 12:37:59 +00:00
/* Call each solver for the problem */
2013-01-09 11:55:51 +00:00
2013-01-09 12:37:59 +00:00
- for (i = 0; steppers[i] != 0; i++)
+ for (i = 1; steppers[i] != 0; i++)
2013-01-09 11:55:51 +00:00
{
2013-01-09 13:29:02 +00:00
+ printf("spustam driver p=%ld i=%ld\n", p, i);
2013-01-09 11:55:51 +00:00
int s = sys_driver (steppers[i], prob[p], start[p], end[p],
2013-01-09 11:48:16 +00:00
initstepsize[p], &y[sd[p] * i],
epsabs[p], epsrel[p], probname[p]);
2013-01-09 11:55:51 +00:00
-
+ printf("koniec drivera\n");
if (s != GSL_SUCCESS)
2013-01-09 11:48:16 +00:00
{
printf ("start=%.5e, initstepsize=%.5e\n", start[p],
2013-01-09 13:29:02 +00:00
@@ -2450,7 +2458,7 @@ main (void)
2013-01-09 12:25:11 +00:00
/* Basic tests for all steppers */
- for (i = 0; p[i].type != 0; i++)
+ /*for (i = 0; p[i].type != 0; i++)
{
test_stepper (p[i].type);
}
2013-01-09 13:29:02 +00:00
@@ -2469,9 +2477,9 @@ main (void)
2013-01-09 12:25:11 +00:00
test_stepsize_fail (p[i].type, p[i].h);
test_user_break (p[i].type, p[i].h);
}
-
+*/
/* Derivative test for explicit steppers */
-
+/*
explicit_stepper[0].type = gsl_odeiv2_step_rk4;
explicit_stepper[0].h = 1.0e-3;
explicit_stepper[1].type = gsl_odeiv2_step_rk2;
2013-01-09 13:29:02 +00:00
@@ -2491,16 +2499,16 @@ main (void)
2013-01-09 12:25:11 +00:00
test_stepfn (explicit_stepper[i].type);
test_stepfn2 (explicit_stepper[i].type);
}
-
+*/
/* Special tests */
- test_nonstiff_problems ();
+ // test_nonstiff_problems ();
- test_stiff_problems ();
+ // test_stiff_problems ();
test_extreme_problems ();
- test_driver ();
+ //test_driver ();
exit (gsl_test_summary ());
}