pydmqmc.utils.parallel_rk4

pydmqmc.utils.parallel_rk4(func, y, dt, ph, *args, **kwargs)

Update y using the fourth-order Runge-Kutta 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.

phParallelHelper

Instance of the ParallelHelper class for performing reductions.

*args, **kwargs

Additional arguments to pass to func.

Returns:
float

The updated value of y after one integration step.