pyfmmlib: A Python Interface to FMMLIB
pyfmmlib is a Python wrapper for fmmlib2d and fmmlib3d implementations of the fast multipole method for Laplace and Helmholtz potentials by Zydrunas Gimbutas and Leslie Greengard (and including code by many more people).
This wrapper is far from comprehensive. It just catches the things I ended up needing. Nonetheless, the FMMs and a fair bit of other useful stuff is accessible.
Installation
Binary wheels and source code are available from the Python package index.
For either binary or source install, run the following command:
pip install pyfmmlib
Documentation
Not much, unfortunately. Here’s what I do to figure out how to use stuff:
>>> import pyfmmlib >>> dir(pyfmmlib) ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '_add_plot', ...]
Fish the desired function from this list (let’s use ‘legefder’ as an example) and run:
>>> print pyfmmlib.legefder.__doc__
legefder - Function signature:
val,der = legefder(x,pexp,[n])
Required arguments:
x : input float
pexp : input rank-1 array('d') with bounds (n + 1)
Optional arguments:
n := (len(pexp)-1) input int
Return objects:
val : float
der : float
This tells you how to call the function from Python. You can then use grep to fish out the right Fortran source:
$ grep -icl 'legefder' fmmlib*/*/*.f fmmlib3d/src/legeexps.f
Then look at the docs there, and you’re in business. No idea what function name to look for? Just use the same grep procedure to look for keywords.
Crude, but effective. :)
Two more things:
Some functions are wrapped with a _vec suffix. This means they apply to whole vectors of arguments at once. They’re also parallel via OpenMP.
pyfmmlib.fmm_part and pyfmmlib.fmm_tria are (dimension-independent) wrappers that make the calling sequence for the FMMs just a wee bit less obnoxious. See examples/fmm.py for more.
Here’s a rough idea how these are called:
from pyfmmlib import fmm_part, HelmholtzKernel pot, grad = fmm_part("PG", iprec=2, kernel=HelmholtzKernel(5), sources=sources, mop_charge=1, target=targets)Unlike the rest of the library (which calls directly into Fortran), these routines expect (n, 3)-shaped (that is, C-Order) arrays.
License
fmmlib{2,3}d are licensed under the 3-clause BSD license. (as of November 2017)
This wrapper is licensed under the MIT license, as below.
Copyright (C) 2013 Andreas Kloeckner
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Metadata
Release files for pyfmmlib 2026.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyfmmlib-2026.1.tar.gz | 6.1 MB | Without provenance | Details for pyfmmlib-2026.1.tar.gz |
Built distributions (wheels)
Total release size: 35.9 MB
Release files / pyfmmlib-2026.1.tar.gz
| Download URL | pyfmmlib-2026.1.tar.gz |
|---|---|
| Size | 6.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cbef7e859bf474ca72a96c8775e5b7c352eca78f369713f8618c849b44c877c
|
|
BLAKE2b-256 checksum How to use checksums |
2d102b43f9e2c404bd4c44070f3038a53f4093c81f164cee4724a6b233e24fdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp315-cp315t-musllinux_1_2_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp315-cp315t-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
14ffc1bf5a007b8874d4ce7d6e3b080b31dd41b7fbe91541798fd5a4bad9cb8e
|
|
BLAKE2b-256 checksum How to use checksums |
191b41d1277be30fa7dae7129a3f1da97771a99972be371dc71e470bcbc092e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
03f053c3967ebf5381a62e81cbe6c98ba238aed7b8f23c079d9b7a4af8a07b5f
|
|
BLAKE2b-256 checksum How to use checksums |
92a12d834c87b8194a56a15b0c2ad1f0e1de50f084de17dd93de56b90533672f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp315-cp315-musllinux_1_2_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp315-cp315-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.15 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
e67742a893a314909006c859ac3123bc4fdad2fc8cd1a4c37282296a83197be6
|
|
BLAKE2b-256 checksum How to use checksums |
ff5e803748805315703bff2cc4aa8b379fc1ce05078b5713f29e7e627728e0d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.15 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0575a9d6b0dbca7e3d0835b68f5af7a8e2e43949ce38bed99323826b1a605edd
|
|
BLAKE2b-256 checksum How to use checksums |
35871e62c318ac7ba0994769398b1e596f46d1d5647c945f0f392ccfd1952fb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp314-cp314t-musllinux_1_2_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp314-cp314t-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
7d678590e8ba7cf9d0667e374c518f1eacf00f0824935cfe00035efa95f6affc
|
|
BLAKE2b-256 checksum How to use checksums |
f030fb89e04fd849ac39023cc781369390c7bd2279625ece64eab1cf248382c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
188e82c578db942c403226fd7f33e19fb0da880086ded57c03bf01ce056b1348
|
|
BLAKE2b-256 checksum How to use checksums |
b6b97a73019ae07ee5ca0bb050307c5a50f7cc91e9947a4a066e05037658f45e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp314-cp314-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.14 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
3263264d6e9c21c073eae80b1ca4d5caedc573981f970cfde313caf541f912a9
|
|
BLAKE2b-256 checksum How to use checksums |
14b945cdefbb2034f206ae498368daa664dea1871a26faa2f28d4bf87b05034d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1708578348048eba0487b3f30061fff361e116ec20ae5e60cee355a2a6624487
|
|
BLAKE2b-256 checksum How to use checksums |
57e7027d018c81824b84ac70e7f329f25d70eaaa346ee5d9e72514d68bd270d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
f4e4c9ff82c9db00046bcfed885182377bb1f0efd199e42560f40d36cd262241
|
|
BLAKE2b-256 checksum How to use checksums |
ce30d6ba3c1bfc213ac65db66ffe16bb7c629a47cd8e3924271f54b0d0a151dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
90166c1888efd3b59ab9345a78b9fd3de0150fa38ef4f6435955f5b7e0551be0
|
|
BLAKE2b-256 checksum How to use checksums |
b4430af210abd35a7b39c2978bf281957124f4f58097524e9ce5fd7162b027a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
3b1fa16349bbe343f8fb55d9a099fa70681add3c28ae0024160883fc12272fe3
|
|
BLAKE2b-256 checksum How to use checksums |
5bf182ca111439ceec3391898506f9f6f637a38db724230ed81876ae41d42ea7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3ae22fb0d42250f89041449e09c7beb924f75fd12ffdcc5916528b039ca633a0
|
|
BLAKE2b-256 checksum How to use checksums |
b7ef47b1b0b090316f70dc19393fa42b452194bf14c024a4353cf2bf42638029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c60636c0765d0b6bd7ca8366ca57922f65f0487c0ce8e2a4e9a4e7513dd58b7
|
|
BLAKE2b-256 checksum How to use checksums |
684ece67ec2dd4c17746e4bebef28a1a1baf22d907ef621685c03638c1a87812
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfmmlib-2026.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfmmlib-2026.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
21e9803303b8826cf64dae4eec74047027c9cd4b4ef7b32984b538d72059f28d
|
|
BLAKE2b-256 checksum How to use checksums |
4e4059da037695bef02e25a982fd36591b98e0a37cc459f8e5437a4a9f9663aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for pyfmmlib 2026.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.