{"id":34036860,"url":"https://github.com/matthiasnwt/fast-poisson-solver","last_synced_at":"2026-03-17T22:37:16.496Z","repository":{"id":166080037,"uuid":"639560965","full_name":"matthiasnwt/fast-poisson-solver","owner":"matthiasnwt","description":"The Poisson equation is an integral part of many physical phenomena, yet its computation is often time-consuming. This module presents an efficient method using physics-informed neural networks (PINNs) to rapidly solve arbitrary 2D Poisson problems.","archived":false,"fork":false,"pushed_at":"2023-06-27T12:04:19.000Z","size":21400,"stargazers_count":28,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-15T12:45:15.880Z","etag":null,"topics":["math","physics","physics-2d","physics-engine","physics-informed-neural-networks","physics-simulation","pinn","poisson","poisson-equation","poisson-equation-solver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthiasnwt.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":null,"support":null,"governance":null}},"created_at":"2023-05-11T18:02:11.000Z","updated_at":"2025-12-15T09:59:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"2fc72c19-7f7a-4866-a0d2-cfc3c318e4cf","html_url":"https://github.com/matthiasnwt/fast-poisson-solver","commit_stats":{"total_commits":59,"total_committers":2,"mean_commits":29.5,"dds":"0.13559322033898302","last_synced_commit":"5edede2f624e2d609489138783ffefa5c2c3a799"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matthiasnwt/fast-poisson-solver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasnwt%2Ffast-poisson-solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasnwt%2Ffast-poisson-solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasnwt%2Ffast-poisson-solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasnwt%2Ffast-poisson-solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthiasnwt","download_url":"https://codeload.github.com/matthiasnwt/fast-poisson-solver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasnwt%2Ffast-poisson-solver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["math","physics","physics-2d","physics-engine","physics-informed-neural-networks","physics-simulation","pinn","poisson","poisson-equation","poisson-equation-solver"],"created_at":"2025-12-13T20:44:52.442Z","updated_at":"2026-03-17T22:37:16.488Z","avatar_url":"https://github.com/matthiasnwt.png","language":"Python","readme":"# Fast Poisson Solver\n\nThe Poisson equation is an integral part of many physical phenomena, yet its computation\nis often time-consuming. This module presents an efficient method using\nphysics-informed neural networks (PINNs) to rapidly solve arbitrary 2D Poisson\nproblems. Focusing on the 2D Poisson equation, the\nmethod used in this module shows significant speed improvements over the finite difference\nmethod while maintaining high accuracy in various test scenarios.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/matthiasnwt/fast-poisson-solver/main/assets/perlin.png\" height=\"200\"/\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/matthiasnwt/fast-poisson-solver/main/assets/sin.png\" height=\"200\"/\u003e\n\u003c/div\u003e\n\nThe improved efficiency comes from the possibility to pre-compute domain specific steps.\nThis means, for a given domain, the Poisson equation can be efficiently solved for different source functions and boundary conditions.\nThe basic usage example below illustrates this.\nThis approach is therefore only faster, if the Poisson equation needs to solved for the same domain with different source functions and boundary values, e.g. in simulation software. \n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/matthiasnwt/fast-poisson-solver/main/assets/execution_time_vs_precision.png\" height=\"320\" /\u003e\n\u003c/div\u003e\n\nThis module comes with an easy-to-use method for solving arbitrary 2D Poisson problems.\nIt also includes a numerical solver and an analyzing function to quantify the results.\nFor visual inspection, the module offers a plotting function.\n\nIn its current version this module supports only 2D Poisson problems with Dirichlet boundary conditions.\nThe boundary conditions should be a constant value.\n\n## Installation\n\nThis project is available on PyPI and can be installed with pip.\n\n```bash\npip install fast-poisson-solver\n```\nEnsure that you have the latest version of pip; if you're unsure, you can upgrade pip with the following command:\n\n```bash\npip install --upgrade pip\n```\n\nYou might need to use `pip3` instead of `pip`, depending on your system.\n\n## Basic Usage\nThe Fast Poisson Solver is designed to be highly adaptable and flexible. It can accept a variety of input formats, including lists, numpy arrays, and PyTorch tensors. Please note that currently, only 2D domains are supported.\n\nThe solver requires `x` and `y` coordinates for both the PDE domain and the boundary region. The order of these coordinates does not matter. For each pair of `x` and `y` coordinates, the PDE domain needs a value for the source function, and the boundary domain needs a value for the boundary condition.\n\nOnce the pre-computation for each domain and boundary region is done, it can be used for unlimited different source functions and boundary condition values.\n\nHere is a basic example:\n\n```python\nfrom fast_poisson_solver import Solver\n\nsolver = Solver()\nsolver.precompute(x_pde, y_pde, x_bc, y_bc)\n\nu_ml, u_ml_pde, u_ml_bc, f_ml, t_ml = solver.solve(f1, u_bc1)\nu_ml, u_ml_pde, u_ml_bc, f_ml, t_ml = solver.solve(f2, u_bc2)\nu_ml, u_ml_pde, u_ml_bc, f_ml, t_ml = solver.solve(f3, u_bc3)\n# ...\n```\n\nPlease replace x_pde, y_pde, x_bc, y_bc, f, and u_bc with your actual data or variables.\n\nAs the approach works best for coordinates that lie between 0 and 1, is it hard limited on this interval.\nThe order of the coordinates does not matter as long as the `x`, `y` and corresponding source term or value for the boundary condition match.\nIt is also not important for the coordinates to lie on a grid (Note: The numeric function needs a grid).\n\nFor more details see the [Documentation](https://fast-poisson-solver.readthedocs.io/en/latest/)\n\n## Contributing\nWe warmly welcome contributions to this module. \nIf you have ideas for improvements, new features, or bug fixes, please feel free to submit a pull request.\nWe appreciate your support in making this module more useful for everyone. \nWhen making a contribution, please ensure your code adheres to our guidelines, which can also be found in the repository.\n\n## License\nCopyright (C) 2023 Matthias Neuwirth\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n## Contact\nIf you encounter any issues while using this module, or if you have suggestions for improvements or new features, please report them to us through the \"Issues\" tab.\n\n## Roadmap and Future Enhancements\n* Dirichlet boundary conditions with multiple values or multiple regions of Dirichlet boundary conditions\n* Neuman, Robin, and mixed boundary conditions\n* Extend this approach to 1D and 3D or even nD\n* Easy to compute force term\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthiasnwt%2Ffast-poisson-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthiasnwt%2Ffast-poisson-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthiasnwt%2Ffast-poisson-solver/lists"}