add em color
[sddekit.git] / sk_scheme.h
bloba071fbf6f84ae148f599890c65376ad3fd2677e0
1 /* Apache 2.0 INS-AMU 2015 */
3 #ifndef SK_SCHEME_H
4 #define SK_SCHEME_H
6 #include "sk_solv.h"
8 /* Euler-Maruyama O(1) general purpose */
9 typedef struct {
10 double *f, *g, *z;
11 } sk_sch_em_data;
13 int sk_sch_em_init(sk_sch_em_data *d, int nx);
15 void sk_sch_em_free(sk_sch_em_data *d);
17 SK_DEFSCH(sk_sch_em);
19 /* E-M for colored noise, derived from Fox 1998,
20 * (no proof of convergence for multiplicate noise!)
22 typedef struct {
23 int first_call;
24 double *f, *g, *z, *eps, lam;
25 } sk_sch_emcolor_data;
27 int sk_sch_emcolor_init(sk_sch_emcolor_data *d, int nx, double lam);
29 void sk_sch_emcolor_free(sk_sch_emcolor_data *d);
31 SK_DEFSCH(sk_sch_emcolor);
33 /* c.f. Manella 2002, O(2) in drift term, additive noise only */
34 typedef struct {
35 double *fl, *fr, *gl, *gr, *z, *xr;
36 } sk_sch_heun_data;
38 int sk_sch_heun_init(sk_sch_heun_data *d, int nx);
40 void sk_sch_heun_free(sk_sch_heun_data *d);
42 SK_DEFSCH(sk_sch_heun);
44 /* TODO http://arxiv.org/pdf/1506.05708v1.pdf LL for mult noise */
45 SK_DEFSCH(llmult);
47 #endif