Skip to main content

Symbolic calculus for partial differential equations (and variational forms)

Project description

CI status Run notebooks in Binder Documentation Status

SymPDE is a symbolic calculus library for partial differential equations and variational forms. It can be used to have similar capabilities as the fenics project, by extending and writing your own printing functions.

An example of use can be found in psydac or gelato.

Installation

Set up a virtual environment

We always recommend working in a Python virtual environment. To create a new one we recommend the venv package:

python3 -m venv <ENV-PATH>

where <ENV-PATH> is the location to create the virtual environment. (A new directory will be created at the required location.)

In order to activate the environment from a new terminal session just run the command

source <ENV-PATH>/bin/activate

Option 1: Install from PyPI

Make sure that the preferred virtual environment is activated. Then simply run

pip3 install sympde

This will download the correct version of SymPDE from PyPI and install it in the virtual environment.

Option 2: Install from sources

First, clone the repository with Git to download the source files, and change the current directory:

git clone https://github.com/pyccel/sympde.git
cd sympde

To check out a specific branch/tag/commit named <TAG>, just use git checkout <TAG>.

  • Static mode

    To install the source files in the virtual environment just run:

    python3 -m pip install .

    Further changes to the cloned directory are not reflected in the installed package. This is why we call it a static installation.

  • Editable mode

    In order to make changes to the library, and see these changes when the package is imported, SymPDE should be installed in editable mode:

    python3 -m pip install --editable .

For developers

Because many important features of SymPDE are only tested in Psydac, new PRs should also be tested against the test suite of Psydac. This can be done by opening a PR in Psydac, where the only change consists of installing the corresponding branch of SymPDE. To achieve this, one just needs to modify the line corresponding to sympde in the pyproject.yaml file.

For instance, to test a new SymPDE branch called my_feature, one should write

# Our packages from PyPi
'sympde @ https://github.com/pyccel/sympde/archive/refs/heads/my_feature.zip',

Similarly, to test an unreleased version of SymPDE called v0.18.4-trunk, one should write

# Our packages from PyPi
'sympde @ https://github.com/pyccel/sympde/archive/refs/tags/v0.18.4-trunk.zip',

Do not forget the comma at the end of the line, as this is an item in a list. Also, pay attention to the words head and tags in the path: the former is used for Git branches, the latter is used for Git tags (which may or may not correspond to GitHub releases).

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

sympde-0.19.2.tar.gz (106.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sympde-0.19.2-py3-none-any.whl (125.1 kB view details)

Uploaded Python 3

File details

Details for the file sympde-0.19.2.tar.gz.

File metadata

  • Download URL: sympde-0.19.2.tar.gz
  • Upload date:
  • Size: 106.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for sympde-0.19.2.tar.gz
Algorithm Hash digest
SHA256 a8149ad1d753f546a021d7a56e7ffa0d6c22c061398dfea3f23711b2241f65b4
MD5 e01e7e05614f5b6bee34438cc73691a8
BLAKE2b-256 8a08d8cb7f6fc79c57b4b70f174cdae6d00ffec45361a1ffde794744b0fd530d

See more details on using hashes here.

File details

Details for the file sympde-0.19.2-py3-none-any.whl.

File metadata

  • Download URL: sympde-0.19.2-py3-none-any.whl
  • Upload date:
  • Size: 125.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for sympde-0.19.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4fa57c26d631e5befadf03cc6fee517fb3ccf1169452b391a9d5968ae01f417b
MD5 0d05ec566578d2ec53b0ba68c2b7fcd2
BLAKE2b-256 3f7809159f78b569ffaee6338e924da97769ece996691ba86308a369783c9b50

See more details on using hashes here.

Supported by

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