pydmqmc.utils.euler
- pydmqmc.utils.euler(func, y, dt, ph_dummy=None, *args, **kwargs)
Update y using Euler’s method.
Function func is of the form:
dy/dt = func(y, ...)
- Parameters:
- funcfunction
The function defining the ODE. It should take at least one float as it’s first argument.
- yfloat
The current value of the variable being integrated.
- dtfloat
The time step for the integration.
- ph_dummyNone
A dummy argument for a parallel helper, not used in this serial version.
- *args, **kwargs
Additional arguments to pass to func.
- Returns:
- float
The updated value of y after one integration step.