Solver in the low-rank tensor-train format with cross approximation approach for solution of the multidimensional Fokker-Planck equation
Project description
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.8). It can be also downloaded from the repository fpcross and installed by python setup.py install
command from the root folder of the project.
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:
- multidimensional simple diffusion problem (see
fpcross/equation_demo/equation_dif.py
); - multidimensional Ornstein-Uhlenbeck process (see
fpcross/equation_demo/equation_oup.py
); - 3-dimensional dumbbell model (see
fpcross/equation_demo/equation_dum.py
).
A demonstration of their solution is given in the script demo/check.py
(run it as python demo/check.py
from the root of the project).
Authors
✭__🚂 The stars that you give to fpcross, motivate us to develop faster and add new interesting features to the code 😃
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
Built Distribution
File details
Details for the file fpcross-0.5.5.tar.gz
.
File metadata
- Download URL: fpcross-0.5.5.tar.gz
- Upload date:
- Size: 356.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc47d8bb448e79a3de5f70fab09a11871ca59833e47579ee556b0d898d8ef12a |
|
MD5 | a139fc73b999fdd8dd8a0d2b3efef830 |
|
BLAKE2b-256 | c20446d4a2e859ffca32f5640cba578575f116c2f72626a09fb0f0f0a6a2d8a3 |
File details
Details for the file fpcross-0.5.5-py3-none-any.whl
.
File metadata
- Download URL: fpcross-0.5.5-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9858d2c9a2c91e7229c7c20d51b859ed4d08fc875f99195a4c229bd60ede757f |
|
MD5 | 9dab0ad3a31c6797044a4fce2d0ac7a5 |
|
BLAKE2b-256 | d2a41fe09d924ac573013d9f237a0f492bf4bf62ff6662119f79d389d055b8e3 |