hypersynchronization.simulate_kuramoto#
- hypersynchronization.simulate_kuramoto(H, omega=None, theta_0=None, t_end=100, dt=0.01, rhs=None, integrator='explicit_euler', args=(), seed=None, **options)[source]#
Simulate the Kuramoto model on a hypergraph.
- Parameters:
- Hxgi.Hypergraph
Hypergraph on which to simulate coupled oscillators.
- omegafloat or array-like, optional
Natural frequencies of each node. If None (default), drawn from a standard normal distribution.
- theta_0array-like, optional
Initial phases of each node. If None (default), drawn uniformly on [0, 2pi[.
- t_endfloat, optional
End time of the integration. Default is 100.
- dtfloat, optional
Time step for output. Default is 0.01.
- rhscallable, optional
Right-hand side of the ODE. Must return a numpy.ndarray of length N. Its first three arguments must be t, theta, and omega; extra arguments are passed via args. Default is rhs_23_sym_nb.
- integratorstr, optional
Integration method. Either “explicit_euler” (default) or any method accepted by scipy.integrate.solve_ivp.
- argstuple, optional
Extra arguments passed to rhs after t, theta, and omega. Default is ().
- seedint, numpy.random.Generator, or None, optional
Seed for generating omega and theta_0 when they are not provided. Default is None.
- **options
Additional keyword arguments passed to scipy.integrate.solve_ivp when integrator is not “explicit_euler”.
- Returns:
- thetasnumpy.ndarray of shape (N, n_t)
Phases of each node at each time step.
- timesnumpy.ndarray of shape (n_t,)
Time points corresponding to each column of thetas.