{"id":22366466,"url":"https://github.com/microsoft/svirl","last_synced_at":"2025-07-30T17:31:35.237Z","repository":{"id":65976255,"uuid":"290342059","full_name":"microsoft/svirl","owner":"microsoft","description":"Svirl is GPU-accelerated solver of complex Ginzburg-Landau equations for superconductivity. It consists of time-dependent solver to describe vortex dynamics and free energy minimizer to accurately find static configurations.","archived":false,"fork":false,"pushed_at":"2022-09-01T18:36:18.000Z","size":2077,"stargazers_count":21,"open_issues_count":5,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-04T17:49:14.489Z","etag":null,"topics":["cuda","ginzburg-landau","gpu","python","scientific-computing","superconductivity","vortex"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2020-08-25T23:01:27.000Z","updated_at":"2024-08-11T08:03:56.000Z","dependencies_parsed_at":"2023-02-19T19:30:58.159Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/svirl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsvirl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsvirl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsvirl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsvirl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/svirl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228164526,"owners_count":17879085,"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":["cuda","ginzburg-landau","gpu","python","scientific-computing","superconductivity","vortex"],"created_at":"2024-12-04T18:12:19.961Z","updated_at":"2024-12-04T18:12:20.777Z","avatar_url":"https://github.com/microsoft.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svirl: GPU-accelerated Ginzburg-Landau equations solver\n\nSvirl is an open source solver of complex Ginzburg-Landau (GL) equations \nmainly used to describe magnetic vortices in superconductors. It consists of two \nparts: (i) time-dependent Ginzburg-Landau (TDGL) solver [1] and (ii) GL free \nenergy minimizer with uses modified non-linear conjugate gradient method.\n\nThe current version of Svirl can be used for two-dimensional (2D) systems only, \nthe work on three-dimensional (3D) solver is in progress.\n\nSvirl has intuitive Python3 API and requires nVidia GPU to run. The idea of \nGPU-acceletrated TDGL solver was initially developed in the framework of [OSCon \nproject](http://oscon-scidac.org/) for infinite GL parameter limit.\n\n## Main features\n* 2D time-dependent GL solver \n* 2D GL free energy minimizer\n* finite and infinite GL parameters\n* user-defined material domain for order parameter\n* calculates observables such as GL free energy, current density, and magnetic field\n* detector of vortex positions\n* uses nVidia CUDA by means of [pyCUDA](https://documen.tician.de/pycuda/)\n\u003c!-- * single and double precision floating point arithmetic --\u003e\n\n## Example\n```python\nimport numpy as np\nfrom svirl import GLSolver\n\ngl = GLSolver(\n    dx = 0.5, dy = 0.5,\n    Lx = 64, Ly = 64,\n    order_parameter = 'random',\n    gl_parameter = 5.0,  # np.inf\n    normal_conductivity = 200.0,\n    homogeneous_external_field = 0.1,\n    dtype = np.float64,\n)\n\ngl.solve.td(dt=0.1, Nt=1000)\n\ngl.solve.cg(n_iter = 1000)\n\nvx, vy, vv = gl.params.fixed_vortices.vortices\nprint('Order parameter: array of shape', gl.vars.order_parameter.shape)\nprint('%d vortices detected' % vx.size)\n\nprint('Free energy: ', gl.observables.free_energy)\n\nch, cv = gl.observables.current_density\nprint('Total current density: two arrays of shape', ch.shape, '[horizontal links] and', cv.shape, '[vertical links]')\n\nch, cv = gl.observables.supercurrent_density\nprint('Supercurrent density: two arrays of shape', ch.shape, '[horizontal links] and', cv.shape, '[vertical links]')\nprint('Magnetic field: array of shape', gl.observables.magnetic_field.shape)\n```\n\n\n# References\n\n1. I.A. Sadovskyy et al, Stable large-scale solver for Ginzburg-Landau equations for superconductors, [J. Comp. Phys. 294, 639 (2015)](https://doi.org/10.1016/j.jcp.2015.04.002); [arXiv:1409.8340](https://arxiv.org/abs/1409.8340).\n\n\n\u003c!-- Directory structure\n\n* [`svirl`](../../tree/master/svirl) \u0026mdash; main package\n  * [`svirl/solvers`](../../tree/master/svirl/solvers) \u0026mdash; [conjugate gradient free energy minimizer](../../blob/master/solvers/cg.py) and [time-dependent](../../blob/solvers/td.py) solvers\n  * [`svirl/mesh`](../../tree/master/svirl/mesh) \u0026mdash; material tiling and grid coordinates at cells, nodes, and edges\n  * [`svirl/storage`](../../tree/master/svirl/storage) \u0026mdash; storage on host and device\n  * [`svirl/parallel`](../../tree/master/svirl/parallel) \u0026mdash; reductions and cuda device initialization\n  * [`svirl/variables`](../../tree/master/svirl/variables) \u0026mdash; parameters and variables\n  * [`svirl/observables`](../../tree/master/svirl/observables) \u0026mdash; physical observables including vortex detector\n  * [`svirl/cuda`](../../tree/master/svirl/cuda) \u0026mdash; CUDA kernels\n* [`docs`](../../tree/master/docs) \u0026mdash; documentation\n  * [Style guide](../../blob/master/docs/style_guide.md)\n* [`examples`](../../tree/master/examples) \u0026mdash; examples and use cases\n* [`tests`](../../tree/master/tests) \u0026mdash; automatic and manual tests --\u003e\n\n# Code of conduct\n\nWe follow the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fsvirl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fsvirl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fsvirl/lists"}