Skip to main content

Solver in the low-rank tensor-train format with cross approximation approach for solution of the multidimensional Fokker-Planck equation

Project description

Package fpcross

Description

This python package, named fpcross (Fokker Planck cross-approximation), provides a solver in the low-rank tensor-train format with cross approximation approach for solution of the multidimensional Fokker-Planck equation (FPE) of the form

d r(x, t) / d t = D delta( r(x, t) ) - div( f(x, t) r(x, t) ),
where r(x, 0) = r0(x).

The function f(x, t), its diagonal partial derivatives d f_i (x, t) / d x_i, initial condition r0(x) and scalar diffusion coefficient D should be known. The equation is solved from the initial moment (t = 0) to the user-specified moment (t), while the solutions obtained at each time step can be used if necessary. The resulting solution r(x, t) represents both the TT-tensor on the multidimensional Chebyshev grid and the Chebyshev interpolation coefficients in the TT-format, and therefore it can be quickly calculated at an arbitrary spatial point.

Installation

The package can be installed via pip: pip install fpcross (it requires the Python programming language of the version >= 3.7). It can be also downloaded from the repository fpcross and installed by python setup.py install command from the root folder of the project.

Required python packages matplotlib, numpy, scipy, teneva and tqdm will be automatically installed during the installation of the main software product.

Usage

A compact example of using the solver for a user-defined FPE is provided in the script demo/demo.py (run it as python demo/demo.py from the root of the project).

The software product also implements classes for the model FPEs:

  1. multidimensional simple diffusion problem (see fpcross/equation_demo/EquationDif.py);
  2. multidimensional Ornstein-Uhlenbeck process (see fpcross/equation_demo/EquationOUP.py);
  3. 3-dimensional dumbbell model (see fpcross/equation_demo/EquationDum.py).

A demonstration of their solution is given in the script demo/check.py (run it as python cdemo/heck.py from the root of the project).

Authors

Citation

If you find this approach and/or code useful in your research, please consider citing:

@article{chertkov2021solution,
    author    = {Chertkov, Andrei and Oseledets, Ivan},
    year      = {2021},
    title     = {Solution of the Fokker--Planck equation by cross approximation method in the tensor train format},
    journal   = {Frontiers in Artificial Intelligence},
    volume    = {4},
    issn      = {2624-8212},
    doi       = {10.3389/frai.2021.668215},
    url       = {https://www.frontiersin.org/article/10.3389/frai.2021.668215}
}

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

fpcross-0.2.tar.gz (355.5 kB view details)

Uploaded Source

Built Distribution

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

fpcross-0.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file fpcross-0.2.tar.gz.

File metadata

  • Download URL: fpcross-0.2.tar.gz
  • Upload date:
  • Size: 355.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.11.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for fpcross-0.2.tar.gz
Algorithm Hash digest
SHA256 10df69714f296726118dc6e55b0b0d0531ab4c0f02b8faa63ecbc870f059bce2
MD5 fa2ec2d4f399106d30df01d05007f3b3
BLAKE2b-256 00c03923e3db895203c22a2f5ed83762cd22f8199f5bb461aab9089444ec72a2

See more details on using hashes here.

File details

Details for the file fpcross-0.2-py3-none-any.whl.

File metadata

  • Download URL: fpcross-0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.11.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for fpcross-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 80ae2bb354c607dde8681a98d91977b4a821547207a247232d60c00f45a39ae7
MD5 01ff9242d0bae14813d070af16d9acbf
BLAKE2b-256 076e9c768e97b2ecd0588096f7a536050545303a6004b6617b93fd1271465423

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