1 /* Apache 2.0 INS-AMU 2015 */
16 static SK_DEFOUT(test_out
)
19 (void) nx
; /* unused */
20 fprintf(d
->fd
, "%f\t%f\t%f\n", t
, x
[0], x
[1]);
26 static void test_hist_filler()
30 static double x0
[2] = {1.010403, 0.030870};
32 static int for_scheme(sk_sch sch
, void *schd
, char *name
)
40 sk_solv_init(&solv
, &sk_sys_exc
, &sysd
,
41 sch
, schd
, &test_out
, &outd
,
42 &test_hist_filler
, NULL
,
43 42, 2, x0
, 0, NULL
, NULL
,
48 sprintf(dat_name
, "test_exc_%s.dat", name
);
49 outd
.fd
= fopen(dat_name
, "w");
53 /* deterministic sub-thresh, no crossing */
57 sk_test_true(!outd
.crossed
);
59 /* stochastic sub-thresh, crossing */
64 sk_test_true(outd
.crossed
);
77 sk_sch_heun_data heund
;
78 sk_sch_emcolor_data emcolord
;
80 sk_sch_em_init(&emd
, 2);
81 for_scheme(sk_sch_em
, &emd
, "em");
84 sk_sch_heun_init(&heund
, 2);
85 for_scheme(sk_sch_heun
, &heund
, "heun");
86 sk_sch_heun_free(&heund
);
88 sk_sch_emcolor_init(&emcolord
, 2, 1.0);
89 for_scheme(sk_sch_emcolor
, &emcolord
, "emcolor");
90 sk_sch_emcolor_free(&emcolord
);