{"id":17968527,"url":"https://github.com/inducer/pyfmmlib","last_synced_at":"2025-06-15T16:35:08.627Z","repository":{"id":7566928,"uuid":"8921021","full_name":"inducer/pyfmmlib","owner":"inducer","description":"Python wrappers around fmmlib{2,3}d by Greengard/Gimbutas","archived":false,"fork":false,"pushed_at":"2025-04-29T02:34:21.000Z","size":1189,"stargazers_count":18,"open_issues_count":2,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-15T07:59:37.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/inducer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-03-21T04:18:29.000Z","updated_at":"2025-04-29T02:34:23.000Z","dependencies_parsed_at":"2024-01-31T23:34:32.676Z","dependency_job_id":"9ac31f1e-0400-40aa-b67f-1e5223c54f0a","html_url":"https://github.com/inducer/pyfmmlib","commit_stats":{"total_commits":151,"total_committers":4,"mean_commits":37.75,"dds":0.2781456953642384,"last_synced_commit":"e7bb3d18c58bc72ff00361b9093716c09368b726"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/inducer/pyfmmlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inducer%2Fpyfmmlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inducer%2Fpyfmmlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inducer%2Fpyfmmlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inducer%2Fpyfmmlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inducer","download_url":"https://codeload.github.com/inducer/pyfmmlib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inducer%2Fpyfmmlib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260008987,"owners_count":22945391,"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":[],"created_at":"2024-10-29T14:40:35.486Z","updated_at":"2025-06-15T16:35:08.597Z","avatar_url":"https://github.com/inducer.png","language":"Python","readme":"pyfmmlib: A Python Interface to FMMLIB\n======================================\n\n.. image:: https://gitlab.tiker.net/inducer/pyfmmlib/badges/main/pipeline.svg\n    :alt: Gitlab Build Status\n    :target: https://gitlab.tiker.net/inducer/pyfmmlib/commits/main\n.. image:: https://github.com/inducer/pyfmmlib/workflows/CI/badge.svg?branch=main\n    :alt: Github Build Status\n    :target: https://github.com/inducer/pyfmmlib/actions?query=branch%3Amain+workflow%3ACI\n.. image:: https://badge.fury.io/py/pyfmmlib.png\n    :alt: Python Package Index Release Page\n    :target: https://pypi.org/project/pyfmmlib/\n.. image:: https://zenodo.org/badge/8921021.svg\n    :alt: Zenodo DOI for latest release\n    :target: https://zenodo.org/badge/latestdoi/8921021\n\npyfmmlib is a Python wrapper for `fmmlib2d\n\u003chttps://cims.nyu.edu/cmcl/fmm2dlib/fmm2dlib.html\u003e`_ and `fmmlib3d\n\u003chttps://cims.nyu.edu/cmcl/fmm3dlib/fmm3dlib.html\u003e`_ implementations of the\n`fast multipole method \u003chttps://en.wikipedia.org/wiki/Fast_multipole_method\u003e`_ for\n`Laplace \u003chttps://en.wikipedia.org/wiki/Laplace%27s_equation\u003e`_ and\n`Helmholtz \u003chttps://en.wikipedia.org/wiki/Helmholtz_equation\u003e`_ potentials by\nZydrunas Gimbutas and Leslie Greengard (and including code by many more people).\n\nThis wrapper is far from comprehensive. It just catches the things I ended up\nneeding. Nonetheless, the FMMs and a fair bit of other useful stuff is accessible.\n\nInstallation\n------------\n\nBinary wheels and source code are available from the `Python package index\n\u003chttps://pypi.org/project/pyfmmlib/\u003e`__.\n\nFor either binary or source install, run the following command::\n\n    pip install pyfmmlib\n\nDocumentation\n-------------\n\nNot much, unfortunately. Here's what I do to figure out how to use stuff::\n\n    \u003e\u003e\u003e import pyfmmlib\n    \u003e\u003e\u003e dir(pyfmmlib)\n    ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '_add_plot', ...]\n\n    Fish the desired function from this list (let's use 'legefder' as an\n    example) and run:\n\n    \u003e\u003e\u003e print pyfmmlib.legefder.__doc__\n    legefder - Function signature:\n      val,der = legefder(x,pexp,[n])\n    Required arguments:\n      x : input float\n      pexp : input rank-1 array('d') with bounds (n + 1)\n    Optional arguments:\n      n := (len(pexp)-1) input int\n    Return objects:\n      val : float\n      der : float\n\nThis tells you how to call the function from Python.\nYou can then use grep to fish out the right Fortran source::\n\n    $ grep -icl 'legefder' fmmlib*/*/*.f\n    fmmlib3d/src/legeexps.f\n\nThen look at the docs there, and you're in business. No idea what\nfunction name to look for? Just use the same grep procedure to look\nfor keywords.\n\nCrude, but effective. :)\n\nTwo more things:\n\n* Some functions are wrapped with a ``_vec`` suffix. This means they\n  apply to whole vectors of arguments at once. They're also parallel\n  via OpenMP.\n\n* ``pyfmmlib.fmm_part`` and ``pyfmmlib.fmm_tria`` are (dimension-independent)\n  wrappers that make the calling sequence for the FMMs just a wee bit less\n  obnoxious.  See ``examples/fmm.py`` for more.\n\n  Here's a rough idea how these are called::\n\n      from pyfmmlib import fmm_part, HelmholtzKernel\n\n      pot, grad = fmm_part(\"PG\", iprec=2, kernel=HelmholtzKernel(5),\n              sources=sources, mop_charge=1, target=targets)\n\n  Unlike the rest of the library (which calls directly into Fortran),\n  these routines expect ``(n,3)``-shaped (that is, C-Order) arrays.\n\nLicense\n-------\n\n`fmmlib{2,3}d` are licensed under the 3-clause BSD license. (as of November 2017)\n\nThis wrapper is licensed under the MIT license, as below.\n\nCopyright (C) 2013 Andreas Kloeckner\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finducer%2Fpyfmmlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finducer%2Fpyfmmlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finducer%2Fpyfmmlib/lists"}