Skip to main content

A Python implementation of spectral deferred correction methods and the likes

Project description

The pySDC project is a Python implementation of the spectral deferred correction (SDC) approach and its flavors, esp. the multilevel extension MLSDC and PFASST. It is intended for rapid prototyping and educational purposes. New ideas like e.g. sweepers or predictors can be tested and first toy problems can be easily implemented.

Features

  • Variants of SDC: explicit, implicit, IMEX, multi-implicit, Verlet, multi-level, diagonal, multi-step

  • Variants of PFASST: virtual parallel or MPI-based parallel, classical of multigrid perspective

  • 8 tutorials: from setting up a first collocation problem to SDC, PFASST and advanced topics

  • Projects: many documented projects with defined and tested outcomes

  • Many different examples, collocation types, data types already implemented

  • Works with PETSc through petsc4py , FEniCS and mpi4py-fft

  • Continuous integration via Travis-CI

  • Fully compatible with 3.6 (or higher)

Getting started

The code is hosted on GitHub, see https://github.com/Parallel-in-Time/pySDC, and PyPI, see https://pypi.python.org/pypi/pySDC. Use

pip install pySDC

to get the latest stable release including the core dependencies. Note that this will omit some of the more complex packages not required for the core functionality of pySDC, e.g. mpi4py, fenics and petsc4py (see below). All requirements are listed in the files requirements.txt . To work with the source files, checkout the code from Github and install the dependencies e.g. by using a conda environment and

conda install -c conda-forge --file requirements.txt

To check your installation, run

nosetests -v pySDC/tests

You may need to update your PYTHONPATH by running

export PYTHONPATH=$PYTHONPATH:/path/to/pySDC/root/folder

in particular if you want to run any of the playgrounds, projects or tutorials. All import statements there assume that the pySDC’s base directory is part of PYTHONPATH.

Note: When installing mpi4py, fenics and petsc4py, make sure they use the same MPI installation (e.g. MPICH3). You can achieve this e.g. by

conda install -c conda-forge mpich petsc4py mpi4py fenics

Most of the code is tested automatically using Travis-CI, so a working version of the installation process can always be found in the install-block of the .travis.yml file.

For many examples, LaTeX is used for the plots, i.e. a decent installation of this is needed in order to run the tests. When using fenics or petsc4py, a C++ compiler is required (although installation may go through at first).

For more details on pySDC, check out http://www.parallel-in-time.org/pySDC.

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

pySDC-3.1.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

pySDC-3.1-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file pySDC-3.1.tar.gz.

File metadata

  • Download URL: pySDC-3.1.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for pySDC-3.1.tar.gz
Algorithm Hash digest
SHA256 e1b15123955344f40b36bfc52e5d5c3148234b297859ac9ff0609eb4001a399c
MD5 d4dc8cff04e6702e12e1564fa80bc4c9
BLAKE2b-256 fb76b7e9b6d951ae1bd819ecb4a8a8b4ab75d18d0a4f8520ed956244d34138fd

See more details on using hashes here.

File details

Details for the file pySDC-3.1-py3-none-any.whl.

File metadata

  • Download URL: pySDC-3.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for pySDC-3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 207260bd11926e9ab36649cb5d884c14435ad75506eae998522e0cd65118ed36
MD5 4325fd77af0884a6d8b11f2d8a89166d
BLAKE2b-256 62c86e0bc59c6c53524b87f7d674b17bb56cec8d56f1cb72b9cd9cd6840d6865

See more details on using hashes here.

Supported by

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