{"id":15293050,"url":"https://github.com/stdogpkg/cukuramoto","last_synced_at":"2026-01-28T17:05:00.047Z","repository":{"id":57417776,"uuid":"206872225","full_name":"stdogpkg/cukuramoto","owner":"stdogpkg","description":"A python/CUDA pkg which solves numerically the kuramoto model through the Heun's method","archived":false,"fork":false,"pushed_at":"2019-09-07T03:31:58.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T02:46:53.893Z","etag":null,"topics":["complex-networks","cuda","kuramoto-model"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stdogpkg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-06T20:52:41.000Z","updated_at":"2023-08-30T20:53:24.000Z","dependencies_parsed_at":"2022-08-30T16:50:39.147Z","dependency_job_id":null,"html_url":"https://github.com/stdogpkg/cukuramoto","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdogpkg%2Fcukuramoto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdogpkg%2Fcukuramoto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdogpkg%2Fcukuramoto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdogpkg%2Fcukuramoto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stdogpkg","download_url":"https://codeload.github.com/stdogpkg/cukuramoto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245273124,"owners_count":20588525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["complex-networks","cuda","kuramoto-model"],"created_at":"2024-09-30T16:38:45.949Z","updated_at":"2026-01-28T17:04:55.029Z","avatar_url":"https://github.com/stdogpkg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Install\r\n\r\n```bash\r\npip install cukuramoto\r\n```\r\n\r\n# Running\r\n\r\n```python\r\nimport igraph as ig\r\nimport numpy as np\r\nfrom stdog.utils.misc import ig2sparse \r\n\r\nblock_size=1024 # gpu parameter\r\n\r\nnum_couplings = 40\r\nN = 10000\r\n\r\nG = ig.Graph.Erdos_Renyi(N, 3/N)\r\nadj = ig2sparse(G)\r\nadj = adj.tocsr()\r\nptr, indices = adj.indptr, adj.indices\r\n\r\n\r\ncouplings = np.linspace(0, 4, num_couplings).astype(\"float32\")\r\nomegas = np.tan(( np.arange(1,N+1)*np.pi)/N - ((N+1.)*np.pi)/(2.0*N)  ).astype(\"float32\")\r\nphases = np.random.uniform(-np.pi, np.pi, int(num_couplings*N)).astype(\"float32\")\r\n```\r\n\r\n```python\r\nimport cukuramoto\r\n\r\ndt = 0.1\r\nnum_temps = 100\r\nsimulation = cukuramoto.Heuns(\r\n    N, block_size, omegas, phases, couplings, \r\n    indices, ptr)\r\n\r\nsimulation.heuns(num_temps, dt)\r\norder_parameter_list = simulation.get_order_parameter(num_temps, dt)\r\n```\r\n\r\n```python\r\norder_parameter_list = order_parameter_list.reshape(num_couplings, num_temps)\r\n    \r\nr = np.mean(order_parameter_list, axis=1)\r\nstdr = np.std(order_parameter_list, axis=1)\r\n   \r\nimport matplotlib.pyplot as plt\r\nplt.ion()\r\nfig, ax1 = plt.subplots()\r\nax1.plot(couplings,r,'.-')\r\nax2 = ax1.twinx()\r\nax2.plot(couplings,stdr,'r.-')\r\nplt.show()\r\n```\r\n\r\n![](img.png)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdogpkg%2Fcukuramoto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstdogpkg%2Fcukuramoto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdogpkg%2Fcukuramoto/lists"}