BAOAB(gamma, scale_noise) integrates the Langevin dynamics of a
DynamicalSDEProblem() with dv = f1(v, u, p, t) dt - gamma v dt + sigma dW and du = v dt by the splitting kick (B), drift (A),
Ornstein Uhlenbeck (O), drift (A), kick (B) of Leimkuhler and Matthews
(2013). The O part damps the velocity by c1 = exp(-gamma dt) and adds
c2 g dW with c2 = sqrt((1 - c1^2) / dt) (or 1 with scale_noise = FALSE), both fixed by the initial step size. The method needs f2(v, u, p, t) = v, diagonal noise on the velocities, evaluated as g(v, u, p, t) at the drifted position and half kicked velocity, and a fixed step
size dt. It has strong order 1.
References
Leimkuhler B., Matthews C. (2013). Robust and efficient configurational molecular sampling via Langevin dynamics. Journal of Chemical Physics 138, 174102.
Examples
prob <- DynamicalSDEProblem(function(v, u, p, t) -u, function(v, u, p, t) v,
function(v, u, p, t) 1, 0.5, 1, c(0, 1))
sol <- solve(prob, BAOAB(gamma = 0.5), dt = 0.1, seed = 1)
sol$u[[11]]
#> [1] -0.1345196 1.0271225