diabayes.solver.ODESolver.solve_forward#
- ODESolver.solve_forward(t: Float[Array, 'Nt'], y0: Variables, params: RSFParams | CNSParams, friction_constants: RSFConstants, block_constants: SpringBlockConstants | InertialSpringBlockConstants, method: str = 'RK45') Any [source]#
Solve a forward problem using SciPy’s
solve_ivp
routine. While this routine doesn’t propagate any gradients, it is much faster to initialise and to perform a single forward run. Hence for playing around with different parameters, it is preferred over a JITed JAX implementation.- Parameters:
t (Float[Array, "Nt"]) – A vector of time samples where a solution is requested
y0 (Variables) – The initial values (fricton and state) wrapped in a Variables container.
params (_Params) – The (invertible) parameters that govern the dynamics, wrapped in a Params container.
friction_constants (_Constants) – A container object containing the friction constants
block_constants (_BlockConstants) – A container object containing the block constants
- Returns:
result – Solution time series of friction and state
- Return type: