Skip to main content

A code generator for grid-based PDE solving on CPUs and GPUs

Project description

Github Build Status Azure Build Status Documentation Status https://badge.fury.io/py/pystella.svg

pystella enables the easy expression of both PDE systems and the algorithms to solve them in high-performance computing environments within Python. It provides interfaces to generate custom computational kernels via loopy which can then be executed from Python on (multiple) CPUs or GPUs using pyopencl and mpi4py. Moreover, pystella implements a number of algorithms for PDE time evolution and spatial discretization that can be readily applied to a variety of physical systems.

Its features include:

  • code generation for performant element-wise kernels, stencil-based computations, reductions, and histograms

  • distributed domain decomposition and grid boundary sychronization

  • time-stepping algorithms, including low-storage Runge-Kutta schemes

  • finite difference and spectral collocation methods for spatial derivatives

  • a geometric multigrid solver for generic sets of nonlinear boundary-value problems (in beta)

  • wrappers to OpenCL-based Fast Fourier Transforms (FFTs) and distributed CPU FFTs

  • Fourier space methods for field analysis and solving Poisson’s equation

All of the above functionality is configured to run at high performance by default, as are the interfaces for generating custom kernels (though this is entirely user-configurable!). Additionally, the provided functionality is intended to work seamlessly whether running in distributed- (i.e., multiple devices) or shared-memory (i.e., a single device) contexts without sacrificing performance in either case.

pystella was designed to simulate preheating and gravitational wave production after cosmological inflation and provides a simple way to specify models of this process. However, pystella is also designed to be sufficiently abstract as to provide a good framework for most systems that can be discretized onto grids (e.g., lattice field theory, (magneto)hydrodynamics, Einstein’s equations, electromagnetism, etc.). The preheating-specific components can be viewed as examples for the symbolic representation of arbitrary physical systems as an interface to its code generation routines. pystella provides entry points at varying levels of abstraction—so if you like the idea of pystella but the algorithms you require are not implemented, you can create new interfaces (or extend existing ones) for your purposes with ease. (Better yet, consider contributing a PR!)

pystella is fully documented and is licensed under the liberal MIT license.

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

pystella-2020.1.tar.gz (83.2 kB view details)

Uploaded Source

Built Distribution

pystella-2020.1-py3-none-any.whl (90.6 kB view details)

Uploaded Python 3

File details

Details for the file pystella-2020.1.tar.gz.

File metadata

  • Download URL: pystella-2020.1.tar.gz
  • Upload date:
  • Size: 83.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pystella-2020.1.tar.gz
Algorithm Hash digest
SHA256 d620686041ce5d1db335af6266ec3b00ade2afc772779397133e17558d5f9ac1
MD5 74f2f527c97f6357c0427a8d3e1e9718
BLAKE2b-256 89d4f3dd78d80a9ebc4ba77c85924f2ddc32c9eb93be07123c5d57b028dbab7e

See more details on using hashes here.

File details

Details for the file pystella-2020.1-py3-none-any.whl.

File metadata

  • Download URL: pystella-2020.1-py3-none-any.whl
  • Upload date:
  • Size: 90.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pystella-2020.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3afb37c08bc19ebe4c1f454111b42eb3b0284367fb6325539a50b50020cbfb0
MD5 555be7b2d8fdf957548ea2e69d0941ed
BLAKE2b-256 fc884401468746766ae2edcc2717a14f61fe1eacd7caf48708dcc1d9a536a2ac

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