Skip to main content

Python wrappers for particle FMMs

Project description

https://gitlab.tiker.net/inducer/pyfmmlib/badges/master/pipeline.svg https://badge.fury.io/py/pyfmmlib.png

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

To build this, you need

Run:

python setup.py install

as usual and cross your fingers.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfmmlib-2018.1.1.tar.gz (464.1 kB view details)

Uploaded Source

Built Distributions

pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_x86_64.whl (957.1 kB view details)

Uploaded CPython 3.7m

pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_i686.whl (802.2 kB view details)

Uploaded CPython 3.7m

pyfmmlib-2018.1.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.7m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_x86_64.whl (957.0 kB view details)

Uploaded CPython 3.6m

pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_i686.whl (802.0 kB view details)

Uploaded CPython 3.6m

pyfmmlib-2018.1.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.6m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_x86_64.whl (958.2 kB view details)

Uploaded CPython 3.5m

pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_i686.whl (802.8 kB view details)

Uploaded CPython 3.5m

pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_x86_64.whl (957.0 kB view details)

Uploaded CPython 3.4m

pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_i686.whl (803.4 kB view details)

Uploaded CPython 3.4m

pyfmmlib-2018.1.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.4m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_x86_64.whl (954.6 kB view details)

Uploaded CPython 2.7mu

pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_i686.whl (802.4 kB view details)

Uploaded CPython 2.7mu

pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_x86_64.whl (954.6 kB view details)

Uploaded CPython 2.7m

pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_i686.whl (802.4 kB view details)

Uploaded CPython 2.7m

pyfmmlib-2018.1.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.4 MB view details)

Uploaded CPython 2.7m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

File details

Details for the file pyfmmlib-2018.1.1.tar.gz.

File metadata

  • Download URL: pyfmmlib-2018.1.1.tar.gz
  • Upload date:
  • Size: 464.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for pyfmmlib-2018.1.1.tar.gz
Algorithm Hash digest
SHA256 10daab6dec41043d52cc1fefd8b43dd9502041038636d52d1b44c3afbc7f0f98
MD5 2bdaba06aa35ae8848e23121f256d87e
BLAKE2b-256 af4dcbd182fd0d7a6b81f1bfd4a225788952b765666ed268e4fb02679a2ec2ab

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 957.1 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5003adaac95cea48195f3a0904e9e5d862bcc68fa22523863de6044f275a062f
MD5 1d8ad337c68d7e875b7ba642c888e5f2
BLAKE2b-256 6c714286b11660598f45a980fc5fe9e24b08396aa94793383b87def6f8f77995

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 802.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 9e556cc247939393d68c36461b9943b8149ec68bf60451cf5771edbac0471acd
MD5 89361e63f59a6f4b4e688b1de5a631f8
BLAKE2b-256 b72fa8871aa267b4100aab7acc0513be7bf57febfe648fd815984af1f4fafc15

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for pyfmmlib-2018.1.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 165f3fad9fe7c936fb7ae58b55645ad1728469df3060395760d157ae421ca4aa
MD5 c1e41d6e7bc4451176272f8c1e83649e
BLAKE2b-256 907a694a960c79b9616f6010c2d3888ad14deb5cf588a4ec0441c775e36d41df

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 957.0 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3e3c7614be1e6be2cf3a22cd850968f6e757df395054c28570e0d8d6b5ffb09f
MD5 55c27deb1d40627eb960e7d1cb32cc35
BLAKE2b-256 545fc9fd2acd41f2da4a9ad2f4c44df648023fe6e7ea61dbfafe06ab819d4a93

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 802.0 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 e9034c37aed6bb374c1ab3ae1dd563c93ebf04aadac14bf169814491b6c67798
MD5 c9058b3d55ed0bd9a225c537acd8db2b
BLAKE2b-256 a0bdf422d75f94f4ba8b83b5205e6e5acd1d4f8ec40111281eaf76318f2369a0

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for pyfmmlib-2018.1.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 52f2c07a9c3c97f9fc0b4aae5150da99bb6c60b4a04cc6e6b24d5822c82e074a
MD5 bc523ae0c87d3726620c8e88c0f05ce7
BLAKE2b-256 54afe7d229f152cf95a8fbf31f6223db5291d75a93bea86b50b13b893c3d9791

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 958.2 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 207c851e81932c3aef780fcaa7df362d2ce19f66ccd7fbe57e068ac27999fb6d
MD5 0d0f8c147ff9ac4c9e6dd77122e15125
BLAKE2b-256 136925fe671bc9f022381f359096045d23dc780c2b435a54549418158e904667

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 802.8 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 958f249a2b145bf9550b9cf807b502ff70899f151a9329e3dd5cca19a3601452
MD5 84efa4432f669d9a2df616d42a451366
BLAKE2b-256 2d0422544c3d04de891a0dcd215c87a86ddba87d797168d7cc80b90cfc60aeb7

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 957.0 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 57cd06d10ce3652e7473d698f82aa4622d540e1da87dd7df95b45ece530e7589
MD5 3dd3cb1e2732ed0da914d02f0090028e
BLAKE2b-256 cbe2519bb6413b0667289b3e42220b4e4765ca8aea912451c5f5950689023c30

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_i686.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_i686.whl
  • Upload date:
  • Size: 803.4 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0d5344258f49aa9df6c7d96be56ffffbc38e80794c7a875c4a24766aaad79757
MD5 07097a967f0d18b38cef71445f381906
BLAKE2b-256 ba073183bc9082b48e623f444785612652446537da54890e51e38622e61d993a

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for pyfmmlib-2018.1.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 7db460d9b9d25fb865bf130b60367a317d87c2df38de823cd47eee365beb75b1
MD5 d624736461a79c8787b1aa8670fa5b76
BLAKE2b-256 da7e8416ebdffb314aea5a27f1ef5877815c2fc5b101a2a986f97c5ba961f4ef

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 954.6 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c49e5baeb681d91a8a06e614eb96379990bcf06b5e7640648ff87d87f2114f12
MD5 bcea6a20fc7102e0fd43c1ff40724d17
BLAKE2b-256 becd48764f75a9959f59f15d3a5a13f4b62e5288326bf016691cd129735e3399

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_i686.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_i686.whl
  • Upload date:
  • Size: 802.4 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7a89b82360893abc5494251ce73cc3640d0949dc4cbcd883334e12823e4a5e0c
MD5 7b0bc1eb899d06e62b9d6ab07a28be83
BLAKE2b-256 3a5b45edd871a76d4d21d2a4446e881a00603739799d284c36433a7599c4d8ce

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 954.6 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 265b858d9ebf4dd1d202792f807b5576f39f0fe5ea79e911c5efc03d3e266b36
MD5 215c271774d27e537bd5e12942065855
BLAKE2b-256 c4008d5c9a55084fb3aa2499527f05f9063dcb02ff082d19a3d5c83126216300

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_i686.whl.

File metadata

  • Download URL: pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_i686.whl
  • Upload date:
  • Size: 802.4 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pyfmmlib-2018.1.1-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 f053c5fad0f09af22cefc387971e1001d2b29a2d16b998b601c4e5feb387ce2c
MD5 0351e2042bcb74a98eaa1f703ea62594
BLAKE2b-256 c331e1d14378fcf8256d3d217cb2847c319ce70cc6f3886ebca01451cee38066

See more details on using hashes here.

File details

Details for the file pyfmmlib-2018.1.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for pyfmmlib-2018.1.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 ca9dcd727c8ff67df0bc811962b16127dfbcf9e3d36b4394586b086f2085f497
MD5 93a04aeea7830d539a8eb0f439db71b7
BLAKE2b-256 55e378c6fc20e080263eda29c5d3e0dd2e904482ec364091ab9bc95cc4bde3a2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page