Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Sparse
  • WallLaw
  • improved_comm
  • master
  • mr_refactor_wfb
  • suffa/cumulantfourth_order_correction_with_psm
  • release/0.2.1
  • release/0.2.10
  • release/0.2.11
  • release/0.2.12
  • release/0.2.13
  • release/0.2.14
  • release/0.2.15
  • release/0.2.2
  • release/0.2.3
  • release/0.2.4
  • release/0.2.5
  • release/0.2.6
  • release/0.2.7
  • release/0.2.8
  • release/0.2.9
  • release/0.3.0
  • release/0.3.1
  • release/0.3.2
  • release/0.3.3
  • release/0.3.4
  • release/0.4.0
  • release/0.4.1
  • release/0.4.2
  • release/0.4.3
  • release/0.4.4
  • release/1.0
  • release/1.0.1
  • release/1.1
  • release/1.1.1
  • release/1.2
  • release/1.3
  • release/1.3.1
  • release/1.3.2
  • release/1.3.3
  • release/1.3.4
  • release/1.3.5
  • release/1.3.6
  • release/1.3.7
44 results

Target

Select target project
No results found
Select Git revision
  • GetterSetterAPI
  • HRR
  • HydroPressure
  • InplaceConfig
  • Outflow
  • PhaseField
  • Sparse
  • UBBVelocity
  • UpdateAPISparse
  • WallLaw
  • WetNodeBoundaries
  • csebug
  • feature/sparse
  • feature/try
  • improved_comm
  • install_requires
  • master
  • phaseField
  • relaxationrates
  • test_martin
  • release/0.2.1
  • release/0.2.10
  • release/0.2.11
  • release/0.2.12
  • release/0.2.13
  • release/0.2.14
  • release/0.2.15
  • release/0.2.2
  • release/0.2.3
  • release/0.2.4
  • release/0.2.5
  • release/0.2.6
  • release/0.2.7
  • release/0.2.8
  • release/0.2.9
  • release/0.3.0
  • release/0.3.1
  • release/0.3.2
  • release/0.3.3
  • release/0.3.4
  • release/0.4.0
  • release/0.4.1
  • release/0.4.2
  • release/0.4.3
  • release/0.4.4
  • release/1.0
  • release/1.0.1
  • release/1.1
  • release/1.1.1
  • release/1.2
  • release/1.3
  • release/1.3.1
  • release/1.3.2
  • release/1.3.3
  • release/1.3.4
  • release/1.3.5
  • release/1.3.6
57 results
Show changes
350 files
+ 45976
17746
Compare changes
  • Side-by-side
  • Inline

Files

+3 −3
Original line number Original line Diff line number Diff line
[flake8]
[flake8]
max-line-length=120
max-line-length=120
exclude=lbmpy/plot.py
exclude=src/lbmpy/plot.py
        lbmpy/session.py
        src/lbmpy/session.py
ignore = W293 W503 W291 E741
ignore = W293 W503 W291 C901 E741
+1 −1
Original line number Original line Diff line number Diff line
lbmpy/_version.py export-subst
src/lbmpy/_version.py export-subst
+18 −5
Original line number Original line Diff line number Diff line
__pycache__
__pycache__
.ipynb_checkpoints
.ipynb_checkpoints
.coverage
.coverage*
*.pyc
*.pyc
*.vti
*.vti
/build
/build
/html_doc
/html_doc
/dist
/dist
/*.egg-info
*.egg-info
.cache
.cache
_build
_build
/.idea
/.idea
_local_tmp
_local_tmp
**/.vscode
**/.vscode
/lbmpy_tests/db
**/pylintrc
*.bak
*.tmp
/tests/db
doc/bibtex.json
doc/bibtex.json
/db
/db
/lbmpy/phasefield/simplex_projection.*.so
/src/lbmpy/phasefield/simplex_projection.*.so
/lbmpy/phasefield/simplex_projection.c
/src/lbmpy/phasefield/simplex_projection.c
 No newline at end of file

test-report
report.xml

# macOS
**/.DS_Store
*.uuid

# benchmark database
/tests/benchmark/db
 No newline at end of file
+143 −139
Original line number Original line Diff line number Diff line
stages:
stages:
  - test
  - "Code Quality"
  - "Tests"
  - "Prerelease-Tests"
  - integration
  - nightly
  - docs
  - deploy
  - deploy


# --------------------------  Code Quality --------------------------------------------------------------------------------


# --------------------------  Tests ------------------------------------------------------------------------------------

# Linter for code formatting
flake8-lint:
  stage: "Code Quality"
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/nox:alpine
  script:
    - nox -s lint
  tags:
    - docker


# --------------------------  Tests --------------------------------------------------------------------------------


# Normal test - runs on every commit all but "long run" tests
# Normal test - runs on every commit all but "long run" tests
tests-and-coverage:
testsuite-cuda-py3.10:
  stage: test
  stage: "Tests"
  except:
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/nox:ubuntu24.04-cuda12.6
    variables:
  needs: []
      - $ENABLE_NIGHTLY_BUILDS
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  script:
  script:
    - env
    - pip list
    - export NUM_CORES=$(nproc --all)
    - mkdir -p ~/.config/matplotlib
    - mkdir -p ~/.config/matplotlib
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - mkdir public
    - nox -s "testsuite_gpu-3.10(cupy12)"
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - env
    - pip list
    - py.test -v -n $NUM_CORES --cov-report html --cov-report term --cov=. -m "not longrun" --junitxml=report.xml
    - python3 -m coverage xml
  tags:
  tags:
    - docker
    - docker
    - cuda11
    - cuda
    - cudaComputeCapability6.1
    - AVX
    - AVX
  coverage: /Total coverage:\s\d+.\d+\%/
  artifacts:
  artifacts:
    when: always
    when: always
    paths:
    paths:
      - coverage_report
      - coverage_report
      - test-report
    reports:
    reports:
      cobertura: coverage.xml
      coverage_report:
        coverage_format: cobertura
        path: coverage.xml
      junit: report.xml
      junit: report.xml


# pipeline with latest python version

latest-python:
testsuite-cpu-py3.13:
  stage: test
  stage: "Tests"
  except:
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/nox:alpine
    variables:
  needs: []
      - $ENABLE_NIGHTLY_BUILDS
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/latest_python
  before_script:
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
  script:
  script:
    - env
    - pip list
    - export NUM_CORES=$(nproc --all)
    - mkdir -p ~/.config/matplotlib
    - mkdir -p ~/.config/matplotlib
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - mkdir public
    - nox -s "testsuite_cpu-3.13"
    - py.test -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
  tags:
  tags:
    - docker
    - docker
    - AVX
    - AVX
  artifacts:
  artifacts:
    when: always
    when: always
    paths:
      - test-report
    reports:
    reports:
      junit: report.xml
      junit: report.xml


# Nightly test  - runs "long run" jobs only

test-longrun:
# Normal test with longruns
  stage: test
tests-and-coverage-with-longrun:
  only:
  stage: "Tests"
    variables:
  when: manual
      - $ENABLE_NIGHTLY_BUILDS
  allow_failure: true
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  script:
  script:
    - env 
    # - pip install sympy --upgrade
    - pip list
    - export NUM_CORES=$(nproc --all)
    - export NUM_CORES=$(nproc --all)
    - mkdir -p ~/.config/matplotlib
    - mkdir -p ~/.config/matplotlib
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - mkdir public
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - py.test -v -n $NUM_CORES --cov-report html --cov-report term --cov=. --junitxml=report.xml
    - env
    - pip list
    - py.test -v -n $NUM_CORES
  tags:
  tags:
    - docker
    - docker
    - cuda11
    - cuda
    - cudaComputeCapability6.1
    - AVX
    - AVX
  artifacts:
    when: always
    paths:
      - coverage_report
    reports:
      junit: report.xml


# Minimal tests in windows environment
# --------------------------  Nightly and Pre-Release Tests --------------------------------------------------------------------------------
minimal-windows:

  stage: test
# Test against latest pystencils 2.0 development version
  except:
pystencils-2.0dev:
    variables:
  stage: "Prerelease-Tests"
      - $ENABLE_NIGHTLY_BUILDS
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/nox:ubuntu24.04-cuda12.6
  tags:
  allow_failure: true
    - win
  needs: []
  script:
    - export NUM_CORES=$(nproc --all)
    - export MPLBACKEND=Agg
    - source /cygdrive/c/Users/build/Miniconda3/Scripts/activate
    - source activate pystencils
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - env
    - pip list
    - python -c "import numpy"
    - py.test -v -n $NUM_CORES -m "not (notebook or longrun)"

ubuntu:
  stage: test
  except:
    variables:
      - $ENABLE_NIGHTLY_BUILDS
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/ubuntu
  before_script:
    - apt-get -y remove python3-sympy
    - ln -s /usr/include/locale.h /usr/include/xlocale.h
    - pip3 install `grep -Eo 'sympy[>=]+[0-9\.]+' setup.py | sed 's/>/=/g'`
    - pip3 install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
  script:
  script:
    - export NUM_CORES=$(nproc --all)
    - mkdir -p ~/.config/matplotlib
    - mkdir -p ~/.config/matplotlib
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - env
    - nox -s "testsuite_pystencils2(cupy12)"
    - pip3 list
    - pytest-3 -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
  tags:
  tags:
    - docker
    - docker
    - cuda11
    - AVX
    - cuda
    - cudaComputeCapability6.1
  artifacts:
  artifacts:
    when: always
    when: always
    paths:
      - test-report
    reports:
    reports:
      junit: report.xml
      junit: report.xml


minimal-conda:
minimal-sympy-master:
  stage: test
  stage: "Prerelease-Tests"
  except:
  needs: []
    variables:
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/nox:alpine
      - $ENABLE_NIGHTLY_BUILDS
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/minimal_conda
  script:
  script:
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - nox -s quicktest -P 3.13 -- --sympy-master
    - python setup.py quicktest
  allow_failure: true
  tags:
  tags:
    - docker
    - docker


pycodegen-integration:
# pycodegen-integration:
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
#   image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  stage: test
#   stage: integration
  when: manual
#   when: manual
  allow_failure: true
#   allow_failure: true
#   script:
#     - env
#     - pip list
#     - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pycodegen.git
#     - cd pycodegen
#     - git submodule sync --recursive
#     - git submodule update --init --recursive
#     - git submodule foreach git fetch origin   # compare the latest master version!
#     - git submodule foreach git reset --hard origin/master
#     - cd lbmpy
#     - git remote add test $CI_REPOSITORY_URL
#     - git fetch test
#     - git reset --hard $CI_COMMIT_SHA
#     - cd ..
#     - pip install -e pystencils/
#     - pip install -e lbmpy/
#     - ./install_walberla.sh
#     # build all integration tests
#     - cd walberla/build/
#     - make -j $NUM_CORES MicroBenchmarkGpuLbm LbCodeGenerationExample
#     - cd apps/benchmarks/UniformGridGPU
#     - make -j $NUM_CORES
#     - cd ../UniformGridCPU
#     - make -j $NUM_CORES

#   tags:
#     - docker
#     - cuda
#     - cudaComputeCapability6.1
#     - AVX


# -------------------- Scheduled Tasks --------------------------------------------------------------------------


nightly-sympy:
  stage: nightly
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/latest_python
  before_script:
    - pip install -e .
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - pip install --upgrade --pre sympy
  script:
  script:
    - env
    - env
    - pip list
    - pip list
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pycodegen.git
    - export NUM_CORES=$(nproc --all)
    - cd pycodegen
    - mkdir -p ~/.config/matplotlib
    - git submodule sync --recursive
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - git submodule update --init --recursive
    - mkdir public
    - git submodule foreach git fetch origin   # compare the latest master version!
    - pytest -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
    - git submodule foreach git reset --hard origin/master
    - cd lbmpy
    - git remote add test $CI_REPOSITORY_URL
    - git fetch test
    - git reset --hard $CI_COMMIT_SHA
    - cd ..
    - pip install -e pystencils/
    - pip install -e lbmpy/
    - ./install_walberla.sh
    # build all integration tests
    - cd walberla/build/
    - make -j $NUM_CORES MicroBenchmarkGpuLbm LbCodeGenerationExample
    - cd apps/benchmarks/UniformGridGPU
    - make -j $NUM_CORES
    - cd ../UniformGridGenerated
    - make -j $NUM_CORES

  tags:
  tags:
    - docker
    - docker
    - cuda11
    - AVX
    - AVX
    - cuda
    - cudaComputeCapability6.1
  artifacts:
    when: always
    reports:
      junit: report.xml


# -------------------- Linter & Documentation --------------------------------------------------------------------------


flake8-lint:
  stage: test
  except:
    variables:
      - $ENABLE_NIGHTLY_BUILDS
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  script:
    - flake8 lbmpy
  tags:
    - docker
    - cuda11


# -------------------- Documentation and deploy ------------------------------------------------------------------------


build-documentation:
build-documentation:
  stage: test
  stage: docs
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  needs: []
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/documentation
  before_script:
    - pip install -e .
  script:
  script:
    - export PYTHONPATH=`pwd`
    - export PYTHONPATH=`pwd`
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
@@ -205,7 +207,8 @@ build-documentation:
    - sphinx-build -W -b html doc html_doc
    - sphinx-build -W -b html doc html_doc
  tags:
  tags:
    - docker
    - docker
    - cuda11
    - cuda
    - cudaComputeCapability6.1
  artifacts:
  artifacts:
    paths:
    paths:
      - html_doc
      - html_doc
@@ -213,7 +216,10 @@ build-documentation:


pages:
pages:
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  rules:
    - if: '$CI_PIPELINE_SOURCE != "schedule" && $CI_PROJECT_PATH == "pycodegen/lbmpy" && $CI_COMMIT_BRANCH == "master"'
  stage: deploy
  stage: deploy
  needs: ["testsuite-cuda-py3.10", "build-documentation"]
  script:
  script:
    - ls -l
    - ls -l
    - mv coverage_report html_doc
    - mv coverage_report html_doc
@@ -223,5 +229,3 @@ pages:
      - public
      - public
  tags:
  tags:
    - docker
    - docker
  only:
    - master@pycodegen/lbmpy

AUTHORS.txt

0 → 100644
+14 −0
Original line number Original line Diff line number Diff line

Contributors:
-------------

  - Martin Bauer <martin.bauer@fau.de>
  - Markus Holzer <markus.holzer@fau.de>
  - Michael Kuron <mkuron@icp.uni-stuttgart.de>
  - Stephan Seitz <stephan.seitz@fau.de>
  - Frederik Hennig <frederik.hennig@fau.de>
  - Helen Schottenhamml <helen.schottenhamml@fau.de>
  - Rudolf Weeber <weeber@icp.uni-stuttgart.de>
  - Christian Godenschwager <christian.godenschwager@fau.de>
  - Jan Hönig <jan.hoenig@fau.de>
  - Philipp Suffa <philipp.suffa@fau.de>

CHANGELOG.md

0 → 100644
+6 −0
Original line number Original line Diff line number Diff line
# Change Log

## Unreleased

### Removed
* Removing OpenCL support because it is not supported by pystencils anymore

CONTRIBUTING.md

0 → 100644
+3 −0
Original line number Original line Diff line number Diff line
# Contributing

lbmpy is built on the open-source python framework [pystencils](https://pypi.org/project/pystencils/). Please consider the [contribution guideline](https://i10git.cs.fau.de/pycodegen/pystencils/-/blob/master/CONTRIBUTING.md) of pystencils for contributing to lbmpy.
 No newline at end of file
+0 −12
Original line number Original line Diff line number Diff line
------------------------   Important ---------------------------------

lbmpy is under the following GNU AGPLv3 license. 
This license holds for the sources of lbmpy itself as well 
as for all kernels generated with lbmpy i.e. 
the output of lbmpy is also protected by the GNU AGPLv3 license. 

----------------------------------------------------------------------



                    
                    GNU AFFERO GENERAL PUBLIC LICENSE
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007
                       Version 3, 19 November 2007


+3 −6
Original line number Original line Diff line number Diff line
include README.md
include AUTHORS.txt
include COPYING.txt
include CONTRIBUTING.md
include RELEASE-VERSION
include CHANGELOG.md
global-include *.pyx
include versioneer.py
include lbmpy/_version.py
+29 −3
Original line number Original line Diff line number Diff line
@@ -16,11 +16,12 @@ It even comes with an integrated Chapman Enskog analysis based on sympy!


Common test scenarios can be set up quickly:
Common test scenarios can be set up quickly:
```python
```python
from lbmpy.scenarios import create_channel
from pystencils import Target
from lbmpy.session import *


ch = create_channel(domain_size=(300,100, 100), force=1e-7, method="trt",
ch = create_channel(domain_size=(300, 100, 100), force=1e-7, method=Method.TRT,
                    equilibrium_order=2, compressible=True,
                    equilibrium_order=2, compressible=True,
                    relaxation_rates=[1.97, 1.6], optimization={'target': 'gpu'})
                    relaxation_rates=[1.97, 1.6], optimization={'target': Target.GPU})
```
```


To find out more, check out the interactive [tutorial notebooks online with binder](https://mybinder.org/v2/gh/mabau/lbmpy/master?filepath=doc%2Fnotebooks).
To find out more, check out the interactive [tutorial notebooks online with binder](https://mybinder.org/v2/gh/mabau/lbmpy/master?filepath=doc%2Fnotebooks).
@@ -55,3 +56,28 @@ Documentation


Read the docs [here](http://pycodegen.pages.i10git.cs.fau.de/lbmpy) and
Read the docs [here](http://pycodegen.pages.i10git.cs.fau.de/lbmpy) and
check out the Jupyter notebooks in `doc/notebooks`. 
check out the Jupyter notebooks in `doc/notebooks`. 

Contributing
-------
To see how to open issues, submit bug reports, create feature requests or submit your additions to lbmpy please refer to
[contribution documentation](https://i10git.cs.fau.de/pycodegen/pystencils/-/blob/master/CONTRIBUTING.md) of pystencils since lbmpy is heavily build on pystencils.


Many thanks go to the [contributors](https://i10git.cs.fau.de/pycodegen/lbmpy/-/blob/master/AUTHORS.txt) of lbmpy.


### Please cite us

If you use lbmpy in a publication, please cite the following articles:

Overview:
  - F. Hennig et al, Advanced Automatic Code Generation for Multiple Relaxation-Time Lattice Boltzmann Methods. SIAM Journal on Scientific Computing, 2023. https://doi.org/10.1137/22M1531348 ([Preprint](https://arxiv.org/abs/2211.02435))
  - M. Bauer et al, lbmpy: Automatic code generation for efficient parallel lattice Boltzmann methods. Journal of Computational Science, 2021. https://doi.org/10.1016/j.jocs.2020.101269 ([Preprint](https://arxiv.org/abs/2001.11806))

Multiphase:
   - M. Holzer et al, Highly efficient lattice Boltzmann multiphase simulations of immiscible fluids at high-density ratios on CPUs and GPUs through code generation. The International Journal of High Performance Computing Applications, 2021. https://doi.org/10.1177/10943420211016525


### Further Reading

- F. Hennig et al, Automatic Code Generation for the Cumulant Lattice Boltzmann Method. ICMMES, 2021. [Poster Link](https://www.researchgate.net/publication/353224406_Automatic_Code_Generation_for_the_Cumulant_Lattice_Boltzmann_Method)
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
#     conda env create -f conda_environment_user.yml
#     conda env create -f conda_environment_user.yml
#     . activate pystencils
#     . activate pystencils
#
#
# If you have CUDA installed and want to use your GPU, uncomment the last line to install pycuda
# If you have CUDA or ROCm installed and want to use your GPU, uncomment the last line to install cupy
#
#
# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------------------------


@@ -33,4 +33,4 @@ dependencies:
      - pyevtk # VTK output for serial simulations
      - pyevtk # VTK output for serial simulations
      - blitzdb # file-based No-SQL database to store simulation results
      - blitzdb # file-based No-SQL database to store simulation results
      - pystencils
      - pystencils
      #- pycuda # add this if you have CUDA installed
      #- cupy # add this if you have CUDA or ROCm installed
+59 −27
Original line number Original line Diff line number Diff line
@@ -4,19 +4,29 @@ import tempfile
import runpy
import runpy
import sys
import sys
import warnings
import warnings
import platform
import pathlib

import nbformat
import nbconvert
import sympy

from lbmpy._compat import IS_PYSTENCILS_2

# Trigger config file reading / creation once - to avoid race conditions when multiple instances are creating it
# Trigger config file reading / creation once - to avoid race conditions when multiple instances are creating it
# at the same time
# at the same time
if not IS_PYSTENCILS_2:
    from pystencils.cpu import cpujit
    from pystencils.cpu import cpujit


# trigger cython imports - there seems to be a problem when multiple processes try to compile the same cython file
# trigger cython imports - there seems to be a problem when multiple processes try to compile the same cython file
# at the same time
# at the same time
try:
try:
    import pyximport
    import pyximport

    pyximport.install(language_level=3)
    pyximport.install(language_level=3)
    from lbmpy.phasefield.simplex_projection import simplex_projection_2d  # NOQA
except ImportError:
except ImportError:
    pass
    pass
from lbmpy.phasefield.simplex_projection import simplex_projection_2d  # NOQA



SCRIPT_FOLDER = os.path.dirname(os.path.realpath(__file__))
SCRIPT_FOLDER = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.abspath('lbmpy'))
sys.path.insert(0, os.path.abspath('lbmpy'))
@@ -37,32 +47,42 @@ def add_path_to_ignore(path):


collect_ignore = [os.path.join(SCRIPT_FOLDER, "doc", "conf.py"),
collect_ignore = [os.path.join(SCRIPT_FOLDER, "doc", "conf.py"),
                  os.path.join(SCRIPT_FOLDER, "doc", "img", "mb_discretization", "maxwell_boltzmann_stencil_plot.py")]
                  os.path.join(SCRIPT_FOLDER, "doc", "img", "mb_discretization", "maxwell_boltzmann_stencil_plot.py")]
add_path_to_ignore('pystencils_tests/benchmark')
add_path_to_ignore('_local_tmp')
add_path_to_ignore('_local_tmp')


if IS_PYSTENCILS_2:
    #   TODO: Fix these step-by-step
    collect_ignore += [
        os.path.join(SCRIPT_FOLDER, "doc", "notebooks", "10_tutorial_conservative_allen_cahn_two_phase.ipynb"),
        os.path.join(SCRIPT_FOLDER, "tests", "test_compiled_in_boundaries.ipynb")
    ]


try:
try:
    import pycuda
    import cupy
except ImportError:
except ImportError:
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/test_cpu_gpu_equivalence.py")]
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "tests/test_cpu_gpu_equivalence.py")]


try:
try:
    import waLBerla
    import waLBerla
except ImportError:
except ImportError:
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/test_serial_scenarios.py")]
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "tests/test_datahandling_parallel.py")]
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/test_datahandling_parallel.py")]


try:
try:
    import blitzdb
    import blitzdb
except ImportError:
except ImportError:
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/benchmark"),
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "tests/benchmark"),
                       os.path.join(SCRIPT_FOLDER, "lbmpy_tests/full_scenarios/kida_vortex_flow/scenario_kida_vortex_flow.py")]
                       os.path.join(SCRIPT_FOLDER,
                                    "tests/full_scenarios/kida_vortex_flow/scenario_kida_vortex_flow.py"),
                       os.path.join(SCRIPT_FOLDER, "tests/full_scenarios/shear_wave/scenario_shear_wave.py"),
                       os.path.join(SCRIPT_FOLDER, "tests/test_json_serializer.py"),
                       os.path.join(SCRIPT_FOLDER, "src/lbmpy/db.py")]

if platform.system().lower() == 'windows':
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "tests/test_quicktests.py")]


import sympy
sver = sympy.__version__.split(".")
sver = sympy.__version__.split(".")
if (int(sver[0]) == 1 and int(sver[1]) < 2):
if int(sver[0]) == 1 and int(sver[1]) < 2:
    add_path_to_ignore('lbmpy_tests/phasefield')
    add_path_to_ignore('tests/phasefield')
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/test_n_phase_boyer_noncoupled.ipynb")]
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "tests/test_n_phase_boyer_noncoupled.ipynb")]


collect_ignore += [os.path.join(SCRIPT_FOLDER, 'setup.py')]
collect_ignore += [os.path.join(SCRIPT_FOLDER, 'setup.py')]


@@ -72,10 +92,6 @@ for root, sub_dirs, files in os.walk('.'):
            collect_ignore.append(f)
            collect_ignore.append(f)




import nbformat
from nbconvert import PythonExporter


class IPythonMockup:
class IPythonMockup:
    def run_line_magic(self, *args, **kwargs):
    def run_line_magic(self, *args, **kwargs):
        pass
        pass
@@ -102,22 +118,29 @@ class IPyNbTest(pytest.Item):


        # disable matplotlib output
        # disable matplotlib output
        exec("import matplotlib.pyplot as p; "
        exec("import matplotlib.pyplot as p; "
             "p.close('all'); "
             "p.switch_backend('Template')", global_dict)
             "p.switch_backend('Template')", global_dict)


        # in notebooks there is an implicit plt.show() - if this is not called a warning is shown when the next
        # in notebooks there is an implicit plt.show() - if this is not called a warning is shown when the next
        # plot is created. This warning is suppressed here
        # plot is created. This warning is suppressed here
        # Also animations cannot be shown, which also leads to a warning.
        exec("import warnings;"
        exec("import warnings;"
             "warnings.filterwarnings('ignore', 'Adding an axes using the same arguments as a previous.*');",
             "warnings.filterwarnings('ignore', 'Adding an axes using the same arguments as a previous.*');"
             "warnings.filterwarnings('ignore', 'Animation was deleted without rendering anything.*');",
             global_dict)
             global_dict)
        with tempfile.NamedTemporaryFile() as f:
        with tempfile.NamedTemporaryFile() as f:
            f.write(self.code.encode())
            f.write(self.code.encode())
            f.flush()
            f.flush()
            runpy.run_path(f.name, init_globals=global_dict, run_name=self.name)
            runpy.run_path(f.name, init_globals=global_dict, run_name=self.name)


        #   Close any open figures
        exec("import matplotlib.pyplot as p; "
             "p.close('all')", global_dict)



class IPyNbFile(pytest.File):
class IPyNbFile(pytest.File):
    def collect(self):
    def collect(self):
        exporter = PythonExporter()
        exporter = nbconvert.PythonExporter()
        exporter.exclude_markdown = True
        exporter.exclude_markdown = True
        exporter.exclude_input_prompt = True
        exporter.exclude_input_prompt = True


@@ -136,6 +159,15 @@ class IPyNbFile(pytest.File):
        pass
        pass




if pytest_version >= 70000:
    #   Since pytest 7.0, usage of `py.path.local` is deprecated and `pathlib.Path` should be used instead
    import pathlib

    def pytest_collect_file(file_path: pathlib.Path, parent):
        glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
        if any(file_path.match(g) for g in glob_exprs):
            return IPyNbFile.from_parent(path=file_path, parent=parent)
else:
    def pytest_collect_file(path, parent):
    def pytest_collect_file(path, parent):
        glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
        glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
        if any(path.fnmatch(g) for g in glob_exprs):
        if any(path.fnmatch(g) for g in glob_exprs):
+3 −3
Original line number Original line Diff line number Diff line
@@ -26,14 +26,14 @@ templates_path = ['_templates']
source_suffix = '.rst'
source_suffix = '.rst'
master_doc = 'index'
master_doc = 'index'


copyright = f'{datetime.datetime.now().year}, Martin Bauer'
copyright = f'{datetime.datetime.now().year}, Martin Bauer, Markus Holzer, Frederik Hennig'
author = 'Martin Bauer'
author = 'Martin Bauer, Markus Holzer, Frederik Hennig'
# The short X.Y version (including .devXXXX, rcX, b1 suffixes if present)
# The short X.Y version (including .devXXXX, rcX, b1 suffixes if present)
version = re.sub(r'(\d+\.\d+)\.\d+(.*)', r'\1\2', lbmpy.__version__)
version = re.sub(r'(\d+\.\d+)\.\d+(.*)', r'\1\2', lbmpy.__version__)
version = re.sub(r'(\.dev\d+).*?$', r'\1', version)
version = re.sub(r'(\.dev\d+).*?$', r'\1', version)
# The full version, including alpha/beta/rc tags.
# The full version, including alpha/beta/rc tags.
release = lbmpy.__version__
release = lbmpy.__version__
language = None
language = 'en'
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']
default_role = 'any'
default_role = 'any'
pygments_style = 'sphinx'
pygments_style = 'sphinx'

doc/img/Boundary.svg

0 → 100644
+149 −0

File added.

Preview size limit exceeded, changes collapsed.

doc/img/lbmpy-logo.svg

0 → 100644
+794 −0

File added.

Preview size limit exceeded, changes collapsed.

+27 −31
Original line number Original line Diff line number Diff line
@@ -2,23 +2,23 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!-- Created with Inkscape (http://www.inkscape.org/) -->


<svg
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="53.913788mm"
   width="53.913788mm"
   height="53.913788mm"
   height="53.913788mm"
   viewBox="0 0 53.913788 53.913788"
   viewBox="0 0 53.913788 53.913788"
   version="1.1"
   version="1.1"
   id="svg834"
   id="svg834"
   inkscape:version="0.92.3 (2405546, 2018-03-11)"
   inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
   sodipodi:docname="logo.svg"
   sodipodi:docname="logo.svg"
   inkscape:export-filename="/local/bauer/code/lbmpy/lbmpy/doc/img/logo.png"
   inkscape:export-filename="/local/bauer/code/lbmpy/lbmpy/doc/img/logo.png"
   inkscape:export-xdpi="70.669998"
   inkscape:export-xdpi="70.669998"
   inkscape:export-ydpi="70.669998">
   inkscape:export-ydpi="70.669998"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/">
  <defs
  <defs
     id="defs828">
     id="defs828">
    <marker
    <marker
@@ -641,25 +641,31 @@
     inkscape:pageopacity="0.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:pageshadow="2"
     inkscape:zoom="1.4"
     inkscape:zoom="1.4"
     inkscape:cx="158.26067"
     inkscape:cx="158.21429"
     inkscape:cy="-4.9825309"
     inkscape:cy="251.78571"
     inkscape:document-units="mm"
     inkscape:document-units="mm"
     inkscape:current-layer="layer1"
     inkscape:current-layer="layer1"
     showgrid="false"
     showgrid="false"
     inkscape:window-width="1214"
     inkscape:window-width="1557"
     inkscape:window-height="1052"
     inkscape:window-height="1122"
     inkscape:window-x="1482"
     inkscape:window-x="0"
     inkscape:window-y="524"
     inkscape:window-y="0"
     inkscape:window-maximized="0"
     inkscape:window-maximized="0"
     fit-margin-top="0"
     fit-margin-top="0"
     fit-margin-left="0"
     fit-margin-left="0"
     fit-margin-right="0"
     fit-margin-right="0"
     fit-margin-bottom="0">
     fit-margin-bottom="0"
     inkscape:showpageshadow="0"
     inkscape:pagecheckerboard="1"
     inkscape:deskcolor="#d1d1d1">
    <inkscape:grid
    <inkscape:grid
       type="xygrid"
       type="xygrid"
       id="grid1886"
       id="grid1886"
       originx="-9.8407853"
       originx="-9.8407853"
       originy="-227.28709" />
       originy="-227.28709"
       spacingy="1"
       spacingx="1"
       units="mm" />
  </sodipodi:namedview>
  </sodipodi:namedview>
  <metadata
  <metadata
     id="metadata831">
     id="metadata831">
@@ -688,21 +694,11 @@
       ry="3.0735996"
       ry="3.0735996"
       inkscape:export-xdpi="188.45"
       inkscape:export-xdpi="188.45"
       inkscape:export-ydpi="188.45" />
       inkscape:export-ydpi="188.45" />
    <text
    <path
       xml:space="preserve"
       style="font-weight:bold;font-size:16.9333px;line-height:125%;font-family:'Latin Modern Mono Light';-inkscape-font-specification:'Latin Modern Mono Light, Bold';letter-spacing:0px;word-spacing:0px;fill:#ffffff;stroke-width:0.264583px"
       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.11666656px;line-height:125%;font-family:'Latin Modern Mono Light';-inkscape-font-specification:'Latin Modern Mono Light, ';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
       d="m 21.505785,62.578241 c 0,-0.626532 -0.474132,-0.643466 -0.795865,-0.643466 h -2.015062 v -8.26345 c 0,-0.609599 -0.118533,-0.812798 -0.795865,-0.812798 h -2.607729 c -0.321732,0 -0.812798,0.01693 -0.812798,0.643465 0,0.609599 0.507999,0.626532 0.795865,0.626532 h 2.015063 v 7.806251 h -1.99813 c -0.321732,0 -0.812798,0.01693 -0.812798,0.643466 0,0.609599 0.507999,0.626532 0.795865,0.626532 h 5.435589 c 0.3048,0 0.795865,-0.01693 0.795865,-0.626532 z m 9.228643,-3.064927 c 0,-2.116663 -1.54093,-3.776126 -3.352793,-3.776126 -0.728132,0 -1.405464,0.237066 -1.964263,0.643465 v -2.709328 c 0,-0.609599 -0.118533,-0.812798 -0.795865,-0.812798 h -1.202265 c -0.321732,0 -0.812798,0.01693 -0.812798,0.643465 0,0.609599 0.507999,0.626532 0.795865,0.626532 h 0.609599 v 8.263451 c 0,0.406399 0.01693,0.812798 0.711198,0.812798 0.524933,0 0.660399,-0.237066 0.677332,-0.575732 0.643466,0.541865 1.303865,0.677332 1.79493,0.677332 1.862663,0 3.53906,-1.625597 3.53906,-3.793059 z m -1.388531,0 c 0,1.49013 -1.083731,2.523061 -2.184395,2.523061 -1.202265,0 -1.727197,-1.371597 -1.727197,-2.116662 v -1.202265 c 0,-0.914398 0.897465,-1.710263 1.862663,-1.710263 1.151464,0 2.048929,1.151465 2.048929,2.506129 z m 10.820373,3.064927 c 0,-0.558799 -0.321733,-0.643466 -0.931331,-0.643466 v -3.860792 c 0,-0.355599 -0.03387,-2.336795 -1.608664,-2.336795 -0.474132,0 -1.117598,0.186266 -1.608663,0.745065 -0.287867,-0.491066 -0.745066,-0.745065 -1.269998,-0.745065 -0.491066,0 -0.948265,0.169333 -1.337731,0.474132 -0.118533,-0.372533 -0.440265,-0.389466 -0.745065,-0.389466 h -0.524932 c -0.3048,0 -0.812799,0.03387 -0.812799,0.626532 0,0.558799 0.321733,0.643466 0.931332,0.643466 v 4.842923 c -0.609599,0 -0.931332,0.08467 -0.931332,0.643466 0,0.609599 0.524933,0.626532 0.812799,0.626532 h 1.43933 c 0.3048,0 0.761999,-0.01693 0.761999,-0.626532 0,-0.558799 -0.270933,-0.643466 -0.880532,-0.643466 v -2.827861 c 0,-1.354664 0.575732,-2.099729 1.219198,-2.099729 0.321733,0 0.474132,0.270933 0.474132,1.219198 v 3.708392 c -0.355599,0.01693 -0.677332,0.1016 -0.677332,0.643466 0,0.609599 0.474133,0.626532 0.761999,0.626532 h 1.236131 c 0.304799,0 0.761998,-0.01693 0.761998,-0.626532 0,-0.558799 -0.287866,-0.643466 -0.897465,-0.643466 v -2.827861 c 0,-1.354664 0.592666,-2.099729 1.219198,-2.099729 0.338666,0 0.474132,0.270933 0.474132,1.219198 v 3.708392 c -0.338666,0.01693 -0.660398,0.1016 -0.660398,0.643466 0,0.609599 0.474132,0.626532 0.745065,0.626532 h 1.236131 c 0.304799,0 0.812798,-0.01693 0.812798,-0.626532 z m 9.829776,-3.064927 c 0,-2.116663 -1.540931,-3.776126 -3.352794,-3.776126 -0.728132,0 -1.422397,0.237066 -1.981196,0.660398 -0.01693,-0.389466 -0.169333,-0.575732 -0.778932,-0.575732 H 42.68086 c -0.321733,0 -0.812798,0.03387 -0.812798,0.643466 0,0.609598 0.507999,0.626532 0.795865,0.626532 h 0.609598 v 8.500516 H 42.68086 c -0.321733,0 -0.812798,0.01693 -0.812798,0.643466 0,0.609598 0.507999,0.626532 0.795865,0.626532 h 2.624661 c 0.287866,0 0.795865,-0.01693 0.795865,-0.626532 0,-0.626532 -0.491065,-0.643466 -0.812798,-0.643466 h -0.592666 v -2.963327 c 0.643466,0.558799 1.286931,0.677332 1.777997,0.677332 1.862663,0 3.53906,-1.625597 3.53906,-3.793059 z m -1.388531,0 c 0,1.49013 -1.083731,2.523061 -2.184396,2.523061 -1.202264,0 -1.727196,-1.371597 -1.727196,-2.116662 v -1.202265 c 0,-0.914398 0.897465,-1.710263 1.862663,-1.710263 1.151464,0 2.048929,1.151465 2.048929,2.506129 z M 59.08922,56.46532 c 0,-0.626533 -0.474133,-0.643466 -0.795865,-0.643466 h -1.930397 c -0.304799,0 -0.795865,0.03387 -0.795865,0.626532 0,0.626532 0.474133,0.643466 0.795865,0.643466 h 0.270933 l -1.456264,4.419591 -1.676396,-4.419591 h 0.220133 c 0.304799,0 0.795865,-0.01693 0.795865,-0.626532 0,-0.626533 -0.474133,-0.643466 -0.795865,-0.643466 h -1.930397 c -0.321732,0 -0.795865,0.01693 -0.795865,0.643466 0,0.609598 0.491066,0.626532 0.795865,0.626532 H 52.2143 l 2.370662,5.977455 c -0.06773,0.186266 -0.423333,1.371597 -0.609599,1.744129 -0.338666,0.643466 -0.863598,1.032932 -1.185331,1.032932 0.01693,-0.06773 0.186266,-0.118533 0.186266,-0.372533 0,-0.491066 -0.355599,-0.846665 -0.846665,-0.846665 -0.524932,0 -0.846665,0.355599 -0.846665,0.846665 0,0.761999 0.609599,1.490131 1.490131,1.490131 1.69333,0 2.523062,-2.252129 2.590795,-2.438396 l 2.523061,-7.433718 h 0.4064 c 0.304799,0 0.795865,-0.01693 0.795865,-0.626532 z"
       x="13.547134"
       y="63.204773"
       id="text1392"
       id="text1392"
       inkscape:export-xdpi="188.45"
       aria-label="lbm py" />
       inkscape:export-ydpi="188.45"><tspan
         sodipodi:role="line"
         id="tspan1390"
         x="13.547134"
         y="63.204773"
         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:16.93333244px;font-family:'Latin Modern Mono Light';-inkscape-font-specification:'Latin Modern Mono Light, Bold';fill:#ffffff;stroke-width:0.26458332px">lbm<tspan
   style="font-size:2.82222223px"
   id="tspan1398"> </tspan>py</tspan></text>
    <path
    <path
       style="fill:none;fill-rule:evenodd;stroke:#dddddd;stroke-width:0.84519458;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-8-6-9)"
       style="fill:none;fill-rule:evenodd;stroke:#dddddd;stroke-width:0.84519458;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-8-6-9)"
       d="M 36.797679,33.475 H 23.568513"
       d="M 36.797679,33.475 H 23.568513"
+3 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,9 @@ lbmpy
    :maxdepth: 2
    :maxdepth: 2


    sphinx/tutorials.rst
    sphinx/tutorials.rst
    sphinx/methods.rst
    sphinx/boundary_conditions.rst
    sphinx/forcemodels.rst
    sphinx/api.rst
    sphinx/api.rst




Original line number Original line Diff line number Diff line
@@ -5,14 +5,13 @@ API Reference
   :maxdepth: 1
   :maxdepth: 1


   scenarios.rst
   scenarios.rst
   kernelcreation.rst
   enums.rst
   methodcreation.rst
   stencils.rst
   stencils.rst
   methods.rst
   kernelcreation.rst
   equilibrium.rst
   moment_transforms.rst
   maxwellian_equilibrium.rst
   maxwellian_equilibrium.rst
   continuous_distribution_measures.rst
   continuous_distribution_measures.rst
   moments.rst
   moments.rst
   cumulants.rst
   cumulants.rst
   boundary_conditions.rst
   forcemodels.rst
   zbibliography.rst
   zbibliography.rst

doc/sphinx/enums.rst

0 → 100644
+6 −0
Original line number Original line Diff line number Diff line
************
Enumerations
************

.. automodule:: lbmpy.enums
   :members:
+33 −0
Original line number Original line Diff line number Diff line
*********************************************
Equilibrium Distributions (lbmpy.equilibrium)
*********************************************

.. automodule:: lbmpy.equilibrium


Abstract Base Class
===================

.. autoclass:: lbmpy.equilibrium.AbstractEquilibrium
    :members:
    :private-members: _monomial_raw_moment, _monomial_central_moment, _monomial_cumulant

Generic Discrete Equilibria
===========================

Use the following class for custom discrete equilibria.

.. autoclass:: lbmpy.equilibrium.GenericDiscreteEquilibrium
    :members:

Maxwellian Equilibria for Hydrodynamics
=======================================

The following classes represent the continuous and the discrete variant of the Maxwellian equilibrium for
hydrodynamics.

.. autoclass:: lbmpy.equilibrium.ContinuousHydrodynamicMaxwellian
    :members:

.. autoclass:: lbmpy.equilibrium.DiscreteHydrodynamicMaxwellian
    :members:
Original line number Original line Diff line number Diff line
@@ -6,7 +6,8 @@
  number={4},
  number={4},
  pages={043309},
  pages={043309},
  year={2015},
  year={2015},
  publisher={APS}
  publisher={APS},
  doi={10.1103/PhysRevE.92.043309},
}
}


@PHDTHESIS{luo1993lattice,
@PHDTHESIS{luo1993lattice,
@@ -16,7 +17,7 @@
   school = {GEORGIA INSTITUTE OF TECHNOLOGY.},
   school = {GEORGIA INSTITUTE OF TECHNOLOGY.},
     year = 1993,
     year = 1993,
   adsurl = {http://adsabs.harvard.edu/abs/1993PhDT.......233L},
   adsurl = {http://adsabs.harvard.edu/abs/1993PhDT.......233L},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
  adsnote = {Provided by the SAO/NASA Astrophysics Data System},
}
}


@Article{guo2002discrete,
@Article{guo2002discrete,
@@ -28,8 +29,24 @@
  number    = {4},
  number    = {4},
  pages     = {046308},
  pages     = {046308},
  publisher = {APS},
  publisher = {APS},
  doi = {10.1103/PhysRevE.65.046308},
}
}


@article{HeForce,
  title = {Discrete Boltzmann equation model for nonideal gases},
  author = {He, Xiaoyi and Shan, Xiaowen and Doolen, Gary D.},
  journal = {Physical Review E},
  volume = {57},
  issue = {1},
  pages = {R13--R16},
  numpages = {0},
  year = {1998},
  month = {1},
  publisher = {APS},
  doi = {10.1103/PhysRevE.57.R13}
}


@article{buick2000gravity,
@article{buick2000gravity,
  title={Gravity in a lattice Boltzmann model},
  title={Gravity in a lattice Boltzmann model},
  author={Buick, JM and Greated, CA},
  author={Buick, JM and Greated, CA},
@@ -38,7 +55,8 @@
  number={5},
  number={5},
  pages={5307},
  pages={5307},
  year={2000},
  year={2000},
  publisher={APS}
  publisher={APS},
  doi = {10.1103/PhysRevE.61.5307},
}
}


@phdthesis{schiller2008thermal,
@phdthesis{schiller2008thermal,
@@ -67,35 +85,62 @@ year = {2018}




@article{Semprebon2016,
@article{Semprebon2016,
author = {Semprebon, Ciro and Kusumaatmaja, Halim},
  title = {Ternary free-energy lattice Boltzmann model with tunable surface tensions and contact angles},
  author = {Semprebon, Ciro and Kr\"uger, Timm and Kusumaatmaja, Halim},
  journal = {Phys. Rev. E},
  volume = {93},
  issue = {3},
  pages = {033305},
  numpages = {11},
  year = {2016},
  month = {Mar},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevE.93.033305},
  doi = {10.1103/PhysRevE.93.033305},
keywords = {lbm,multiphase,phasefield},
mendeley-tags = {lbm,multiphase,phasefield},
pages = {1--11},
title = {{Ternary free-energy lattice Boltzmann model with tunable surface tensions and contact angles}},
volume = {033305},
year = {2016}
}
}


@article{geier2015,
@article{geier2015,
author = {Geier, Martin and Sch{\"{o}}nherr, Martin and Pasquali, Andrea and Krafczyk, Manfred},
author = {Geier, Martin and Sch{\"{o}}nherr, Martin and Pasquali, Andrea and Krafczyk, Manfred},
title = {{The cumulant lattice Boltzmann equation in three dimensions: Theory and validation}},
title = {{The cumulant lattice Boltzmann equation in three dimensions: Theory and validation}},
journal = {Computers \& Mathematics with Applications},
journal = {Computers \& Mathematics with Applications},
volume = {70},
number = {4},
pages = {507-547},
year = {2015},
year = {2015},
doi = {10.1016/j.camwa.2015.05.001}
issn = {0898-1221},
doi = {10.1016/j.camwa.2015.05.001},
}

@article{geier2017,
author = {Geier, Martin and Pasquali, Andrea and Sch{\"{o}}nherr, Martin},
title = {Parametrization of the Cumulant Lattice Boltzmann Method for Fourth Order Accurate Diffusion Part I},
year = {2017},
issue_date = {November 2017},
publisher = {Academic Press Professional, Inc.},
address = {USA},
volume = {348},
number = {C},
issn = {0021-9991},
url = {https://doi.org/10.1016/j.jcp.2017.05.040},
doi = {10.1016/j.jcp.2017.05.040},
journal = {J. Comput. Phys.},
month = {nov},
pages = {862–888},
numpages = {27}
}
}


@Article{Coreixas2019,
@Article{Coreixas2019,
  author    = {Christophe Coreixas and Bastien Chopard and Jonas Latt},
  journal   = {Physical Review E},
  title = {Comprehensive comparison of collision models in the lattice Boltzmann framework: Theoretical investigations},
  title = {Comprehensive comparison of collision models in the lattice Boltzmann framework: Theoretical investigations},
  year      = {2019},
  author = {Coreixas, Christophe and Chopard, Bastien and Latt, Jonas},
  month     = {sep},
  journal = {Phys. Rev. E},
  number    = {3},
  pages     = {033305},
  volume = {100},
  volume = {100},
  doi       = {10.1103/physreve.100.033305},
  issue = {3},
  publisher = {American Physical Society ({APS})},
  pages = {033305},
  numpages = {46},
  year = {2019},
  month = {Sep},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevE.100.033305},
  url = {https://link.aps.org/doi/10.1103/PhysRevE.100.033305}
}
}


@PhdThesis{Geier2006,
@PhdThesis{Geier2006,
@@ -104,3 +149,169 @@ doi = {10.1016/j.camwa.2015.05.001}
  title  = {Ab inito derivation of the cascaded lattice Boltzmann automaton},
  title  = {Ab inito derivation of the cascaded lattice Boltzmann automaton},
  year   = {2006},
  year   = {2006},
}
}

@article{Fakhari2018,
title = {A phase-field lattice {Boltzmann} model for simulating multiphase flows in porous media: Application and comparison to experiments of {CO2} sequestration at pore scale},
journal = {Advances in Water Resources},
volume = {114},
pages = {119-134},
year = {2018},
issn = {0309-1708},
doi = {10.1016/j.advwatres.2018.02.005},
author = {Fakhari, A. and Li, Y. and Bolster, D. and Christensen, K. T.},
}

@article{silva2010,
title = {A study on the inclusion of body forces in the lattice Boltzmann BGK equation to recover steady-state hydrodynamics},
journal = {Physica A: Statistical Mechanics and its Applications},
volume = {390},
number = {6},
pages = {1085-1095},
year = {2011},
doi = {10.1016/j.physa.2010.11.037},
author = {Silva, G. and Semiao, V.},
keywords = {{Lattice Boltzmann} method, {BGK} collision operator, Steady-state flows, Body force driven flows}
}

@article{silva2020,
  title = {Force methods for the two-relaxation-times lattice {Boltzmann}},
  author = {Postma, B. and Silva, G.},
  journal = {Phys. Rev. E},
  volume = {102},
  issue = {6},
  year = {2020},
  month = {12},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevE.102.063307},
}

@book{lbm_book,
  doi = {10.1007/978-3-319-44649-3},
  year = {2017},
  publisher = {Springer International Publishing},
  author = {Kr\"{u}ger, T. and Kusumaatmaja, H. and Kuzmin, A. and Shardt, O. and Silva, G. and Viggen, E. M.},
  title = {The Lattice {Boltzmann} Method}
}

@article{Ansumali2003,
	doi = {10.1209/epl/i2003-00496-6},
	year = 2003,
	month = {sep},
	journal = {{IOP} Publishing},
	volume = {63},
	number = {6},
	pages = {798--804},
	author = {S Ansumali and I. V Karlin and H. C Öttinger},
	title = {Minimal entropic kinetic models for hydrodynamics},
	abstract = {We derive minimal discrete models of the Boltzmann equation consistent with equilibrium thermodynamics, and which recover correct hydrodynamics in arbitrary dimensions. A new discrete velocity model is proposed for the simulation of the Navier-Stokes-Fourier equation and is tested in the setup of Taylor vortex flow. A simple analytical procedure for constructing the equilibrium for thermal hydrodynamics is established. For the lattice Boltzmann method of isothermal hydrodynamics, the explicit analytical form of the equilibrium distribution is presented. This results in an entropic version of the isothermal lattice Boltzmann method with the simplicity and computational efficiency of the standard lattice Boltzmann model.}
}

@Article{raw_moments,
  author  = {D. D'Humières},
  journal = {Rarefied gas dynamics},
  title   = {Generalized lattice-{Boltzmann} equations},
  year    = {1992},
}

@article{FAKHARI201722,
    author = "Abbas Fakhari and Diogo Bolster and Li-Shi Luo",
    title = "A weighted multiple-relaxation-time lattice {Boltzmann} method for multiphase flows and its application to partial coalescence cascades",
    journal = "Journal of Computational Physics",
    year = "2017",
    doi = "10.1016/j.jcp.2017.03.062"
}

@article{TRT,
author = {Ginzburg Irina and Frederik Verhaeghe and D. D'Humières},
year = {2008},
month = {01},
pages = {427-478},
title = {Two-relaxation-time Lattice Boltzmann scheme: about parametrization, velocity, pressure and mixed boundary conditions},
volume = {3},
journal = {Communications in Computational Physics}
}

@Article{HeIncompressible,
  author    = {Xiaoyi He and Li-Shi Luo},
  journal   = {Journal of Statistical Physics},
  title     = {Lattice Boltzmann Model for the Incompressible Navier{\textendash}Stokes Equation},
  year      = {1997},
  month     = {aug},
  number    = {3/4},
  pages     = {927--944},
  volume    = {88},
  doi       = {10.1023/b:joss.0000015179.12689.e4},
  publisher = {Springer Science and Business Media {LLC}},
}

@Article{GruszczynskiCascadedPhaseFieldModel,
  author    = {G. Gruszczy{\'{n}}ski and T. Mitchell and C. Leonardi and {\L}. {\L}aniewski-Wo{\l}{\l}k and T. Barber},
  journal   = {Computers {\&} Mathematics with Applications},
  title     = {A cascaded phase-field lattice Boltzmann model for the simulation of incompressible, immiscible fluids with high density contrast},
  year      = {2020},
  month     = {feb},
  number    = {4},
  pages     = {1049--1071},
  volume    = {79},
  doi       = {10.1016/j.camwa.2019.08.018},
  publisher = {Elsevier {BV}},
}

@Article{Casson,
  author    = {R. Ouared and B. Chopard},
  journal   = {Journal of Statistical Physics},
  title     = {Lattice {Boltzmann} Simulations of Blood Flow: {Non-Newtonian} Rheology and Clotting Processes},
  year      = {2005},
  doi       = {10.1007/s10955-005-8415-x},
  publisher = {Springer Link},
}

@article{BouzidiBC,
    author = {Bouzidi, M’hamed and Firdaouss, Mouaouia and Lallemand, Pierre},
    title = "{Momentum transfer of a Boltzmann-lattice fluid with boundaries}",
    journal = {Physics of Fluids},
    year = {2001},
    month = {11},
    doi = {10.1063/1.1399290},
    url = {https://doi.org/10.1063/1.1399290},
}

@Article{rozema15,
  doi       = {10.1063/1.4928700},
  year      = {2015},
  month     = {aug},
  publisher = {AIP Publishing},
  volume    = {27},
  number    = {8},
  author    = {Wybe Rozema and Hyun J. Bae and Parviz Moin and Roel Verstappen},
  title     = {Minimum-dissipation models for large-eddy simulation},
  journal   = {Physics of Fluids}
}

@article{Han2021,
   doi = {10.1088/1873-7005/ac1782},
   url = {https://dx.doi.org/10.1088/1873-7005/ac1782}                    ,
   year = {2021},
   month = {aug},
   publisher = {IOP Publishing},
   volume = {53},
   number = {4},
   pages = {045506},
   author = {Mengtao Han and Ryozo Ooka and Hideki Kikumoto},
   title = {A wall function approach in lattice Boltzmann method: algorithm and validation using turbulent channel flow},
   journal = {Fluid Dynamics Research}
}

@article{Maronga2020,
 author = {Maronga, Bj{\"o}rn and Knigge, Christoph and Raasch, Siegfried},
 year = {2020},
 title = {{An Improved Surface Boundary Condition for Large-Eddy Simulations Based on Monin--Obukhov Similarity Theory: Evaluation and Consequences for Grid Convergence in Neutral and Stable Conditions}},
 pages = {297--325},
 volume = {174},
 number = {2},
 issn = {0006-8314},
 journal = {{Boundary-layer meteorology}},
 doi = {10.1007/s10546-019-00485-w}
}

@Comment{jabref-meta: databaseType:bibtex;}
Original line number Original line Diff line number Diff line
**********************
*******************************
Maxwellian Equilibrium
Maxwellian Equilibrium (Legacy)
**********************
*******************************


.. automodule:: lbmpy.maxwellian_equilibrium
.. automodule:: lbmpy.maxwellian_equilibrium
    :members:
    :members:
@@ -11,7 +11,7 @@ Maxwellian Equilibrium


    .. autofunction:: lbmpy.maxwellian_equilibrium.continuous_maxwellian_equilibrium
    .. autofunction:: lbmpy.maxwellian_equilibrium.continuous_maxwellian_equilibrium


    .. autofunction:: lbmpy.maxwellian_equilibrium.get_moments_of_continuous_maxwellian_equilibrium
    .. autofunction:: lbmpy.maxwellian_equilibrium.get_equilibrium_values_of_maxwell_boltzmann_function


    .. autofunction:: lbmpy.maxwellian_equilibrium.get_moments_of_discrete_maxwellian_equilibrium
    .. autofunction:: lbmpy.maxwellian_equilibrium.get_moments_of_discrete_maxwellian_equilibrium

doc/sphinx/methodcreation.rst

deleted100644 → 0
+0 −8
Original line number Original line Diff line number Diff line
Creating LBM methods
====================

This module is a lower level API to construct methods.
When possible use the high level API.

.. automodule:: lbmpy.methods.creationfunctions
    :members:
Original line number Original line Diff line number Diff line
***********************
********************************
Methods (lbmpy.methods)
Collision models (lbmpy.methods)
***********************
********************************


This module defines the classes defining all types of lattice Boltzmann methods available in *lbmpy*,
together with a set of factory functions used to create their instances. The factory functions are
organized in three levels of abstraction. Objects of the method classes should be created only through
these factory functions, never manually.


LBM Method Interfaces
Methods in *lbmpy* can be distinguished into three categories:
=====================
 - :ref:`methods_rawmomentbased`, including the classical single relaxation-time (SRT, BGK), two relaxation-time (TRT) 
   and multiple relaxation-time (MRT) methods, as well as entropic variants of the TRT method.
 - :ref:`methods_centralmomentbased`, which are multiple relaxation-time methods using relaxation in central moment space.
 - :ref:`methods_cumulantbased`, multiple relaxation-time methods using relaxation in cumulant space.


.. autoclass:: lbmpy.methods.AbstractLbMethod
Abstract LB Method Base Class
    :members:
=============================


.. autoclass:: lbmpy.methods.AbstractConservedQuantityComputation
.. autoclass:: lbmpy.methods.LbmCollisionRule
    :members:
    :members:



.. autoclass:: lbmpy.methods.AbstractLbMethod


LBM with conserved zeroth and first order
=========================================

.. autoclass:: lbmpy.methods.DensityVelocityComputation
    :members:
    :members:


.. _methods_rawmomentbased:


Raw Moment-based methods
========================



These methods are represented by instances of :class:`lbmpy.methods.momentbased.MomentBasedLbMethod` and will derive
Moment-based methods
collision equations either in population space (SRT, TRT, entropic TRT), or in raw moment space (MRT variants).
====================


Creation Functions
Creation Functions
------------------
------------------


The following factory functions create raw moment-based methods using variants of the regular hydrodynamic maxwellian
equilibrium.

.. autofunction:: lbmpy.methods.create_srt
.. autofunction:: lbmpy.methods.create_srt


.. autofunction:: lbmpy.methods.create_trt
.. autofunction:: lbmpy.methods.create_trt
@@ -38,9 +44,7 @@ Creation Functions


.. autofunction:: lbmpy.methods.create_mrt_orthogonal
.. autofunction:: lbmpy.methods.create_mrt_orthogonal


.. autofunction:: lbmpy.methods.create_with_continuous_maxwellian_eq_moments
.. autofunction:: lbmpy.methods.create_trt_kbc

.. autofunction:: lbmpy.methods.create_with_discrete_maxwellian_eq_moments




Class
Class
@@ -50,32 +54,111 @@ Class
    :members:
    :members:




.. _methods_centralmomentbased:

Central Moment-based methods
============================

These methods are represented by instances of :class:`lbmpy.methods.momentbased.CentralMomentBasedLbMethod` and will derive
collision equations in central moment space.

Creation Functions
------------------

The following factory functions create central moment-based methods using variants of the regular hydrodynamic maxwellian
equilibrium.

.. autofunction:: lbmpy.methods.create_central_moment

Class
-----

.. autoclass:: lbmpy.methods.momentbased.CentralMomentBasedLbMethod
    :members:


.. _methods_cumulantbased:

Cumulant-based methods
Cumulant-based methods
======================
======================


These methods are represented by instances of :class:`lbmpy.methods.cumulantbased.CumulantBasedLbMethod` and will derive
collision equations in cumulant space.

Creation Functions
Creation Functions
------------------
------------------


.. autofunction:: lbmpy.methods.create_with_polynomial_cumulants
The following factory functions create cumulant-based methods using the regular continuous hydrodynamic maxwellian equilibrium.

.. autofunction:: lbmpy.methods.create_cumulant


.. autofunction:: lbmpy.methods.create_with_monomial_cumulants
.. autofunction:: lbmpy.methods.create_with_monomial_cumulants


.. autofunction:: lbmpy.methods.create_with_default_polynomial_cumulants
.. autofunction:: lbmpy.methods.create_with_default_polynomial_cumulants


.. autofunction:: lbmpy.methods.create_centered_cumulant_model


Class
-----

.. autoclass:: lbmpy.methods.cumulantbased.CumulantBasedLbMethod
    :members:



Default Moment sets
===================

The following functions provide default sets of polynomial raw moments, central moments and cumulants
to be used in MRT-type methods.

.. autofunction:: lbmpy.methods.default_moment_sets.cascaded_moment_sets_literature

.. autofunction:: lbmpy.methods.default_moment_sets.mrt_orthogonal_modes_literature



Low-Level Method Creation Interface
===================================


Utility
The following classes and factory functions constitute the lower levels of abstraction in method creation.
-------
They are called from the higher-level functions described above, or, in special cases, by the user directly.


.. autofunction:: lbmpy.methods.centeredcumulant.get_default_polynomial_cumulants_for_stencil
Custom method variants in population space, raw and central moment space based on the hydrodynamic Maxwellian
equilibrium may be created using either 
:func:`lbmpy.methods.creationfunctions.create_with_discrete_maxwellian_equilibrium` or 
:func:`create_with_continuous_maxwellian_equilibrium`.


.. autoclass:: lbmpy.methods.centeredcumulant.CenteredCumulantForceModel
Methods may also be created using custom equilibrium distributions using
:func:`lbmpy.methods.creationfunctions.create_from_equilibrium`.

The desired collision space, and the transform classes defining the manner of transforming populations to that
space and back, are defined using :class:`lbmpy.enums.CollisionSpace` and :class:`lbmpy.methods.CollisionSpaceInfo`.

Collision Space Info
--------------------

.. autoclass lbmpy.methods.CollisionSpaceInfo
    :members:
    :members:


Class
Low-Level Creation Functions
-----
----------------------------

.. autofunction:: lbmpy.methods.creationfunctions.create_with_discrete_maxwellian_equilibrium

.. autofunction:: lbmpy.methods.creationfunctions.create_with_continuous_maxwellian_equilibrium


.. autoclass:: lbmpy.methods.centeredcumulant.CenteredCumulantBasedLbMethod
.. autofunction:: lbmpy.methods.creationfunctions.create_from_equilibrium


Conserved Quantity Computation
==============================

The classes of the conserved quantity computation (CQC) submodule define an LB Method's conserved quantities and
the equations to compute them. For hydrodynamic methods, :class:`lbmpy.methods.DensityVelocityComputation` is
the typical choice. For custom methods, however, a custom CQC class might have to be created.

.. autoclass:: lbmpy.methods.AbstractConservedQuantityComputation
    :members:
    :members:


.. autoclass:: lbmpy.methods.DensityVelocityComputation
    :members:
 No newline at end of file
+258 −0
Original line number Original line Diff line number Diff line
*******************************************
Moment Transforms (lbmpy.moment_transforms)
*******************************************

The ``moment_transforms`` module provides an ecosystem for transformation of quantities between
lattice Boltzmann population space and other spaces of observable quantities. Currently, transforms
to raw and central moment space are available.

The common base class `lbmpy.moment_transforms.AbstractMomentTransform` defines the interface all transform classes share.
This interface, together with the fundamental principles all transforms adhere to, is explained 
in the following.

Principles of Collision Space Transforms
========================================

Each class of this module implements a bijective map :math:`\mathcal{M}` from population space 
to raw moment or central moment space, capable of transforming the particle distribution 
function :math:`\mathbf{f}` to (almost) arbitrary user-defined moment sets.

Monomial and Polynomial Moments
-------------------------------

We discriminate *monomial* and *polynomial* moments. The monomial moments are the canonical basis of their
corresponding space. Polynomial moments are defined as linear combinations of this basis. Monomial moments are
typically expressed by exponent tuples :math:`(\alpha, \beta, \gamma)`. The monomial raw moments are defined as

.. math::
    
    m_{\alpha \beta \gamma} 
        = \sum_{i = 0}^{q - 1} f_i c_{i,x}^{\alpha} c_{i,y}^{\beta} c_{i,z}^{\gamma}

and the monomial central moments are given by

.. math::
    
    \kappa_{\alpha \beta \gamma} 
        = \sum_{i = 0}^{q - 1} 
            f_i 
            (c_{i,x} - u_x)^{\alpha} 
            (c_{i,y} - u_y)^{\beta} 
            (c_{i,z} - u_z)^{\gamma}.

Polynomial moments are, in turn, expressed by
polynomial expressions :math:`p` in the coordinate symbols :math:`x`, :math:`y` and :math:`z`.
An exponent tuple :math:`(\alpha, \beta, \gamma)` corresponds directly 
to the mixed monomial expression :math:`x^{\alpha} y^{\beta} z^{\gamma}`. Polynomial moments are then
constructed as linear combinations of these monomials. For example, the polynomial

.. math::

    p(x,y,z) = x^2 + y^2 + z^2 + 1.

defines both the polynomial raw moment

.. math::

    M = m_{200} + m_{020} + m_{002}

and central moment

.. math::

    K = \kappa_{200} + \kappa_{020} + \kappa_{002}.


Transformation Matrices
-----------------------

The collision space basis for an MRT LB method on a :math:`DdQq` lattice is spanned by a set of :math:`q`
polynomial quantities, given by polynomials :math:`\left( p_i \right)_{i=0, \dots, q-1}`.
Through the polynomials, a polynomialization matrix :math:`P` is defined such that

.. math::

    \mathbf{M} &= P \mathbf{m} \\
    \mathbf{K} &= P \mathbf{\kappa}

Both rules can also be written using matrix multiplication, such that

.. math::
    \mathbf{m} = M \mathbf{f} 
    \qquad 
    \mathbf{\kappa} = K \mathbf{f}.

Further, there exists a mapping from raw to central moment space using (monomial or polynomial)
shift matrices (see `set_up_shift_matrix`) such that

.. math::
    \mathbf{\kappa} = N \mathbf{m}
    \qquad
    \mathbf{K} = N^P \mathbf{M}.

Working with the transformation matrices, those mappings can easily be inverted.
This module provides classes that derive efficient implementations of these transformations.

Moment Aliasing
---------------

For a collision space transform to be invertible, exactly :math:`q` independent polynomial quantities of
the collision space must be chosen. In that case, since all transforms discussed here are linear, the space of
populations is isomorphic to the chosen moment space. The important word here is 'independent'. Even if :math:`q`
distinct moment polynomials are chosen, due to discrete lattice artifacts, they might not span the entire collision
space if chosen wrongly. The discrete lattice structure gives rise to *moment aliasing* effects. The most simple such
effect occurs in the monomial raw moments, where are all nonzero even and all odd exponents are essentially the same.
For example, we have :math:`m_{400} = m_{200}` or :math:`m_{305} = m_{101}`. This rule holds on every direct-neighborhood
stencil. Sparse stencils, like :math:`D3Q15`, may introduce additional aliases. On the :math:`D3Q15` stencil, due to its
structure, we have also :math:`m_{112} = m_{110}` and even :math:`m_{202} = m_{220} = m_{022} = m_{222}`.

Including aliases in a set of monomial moments will lead to a non-invertible transform and is hence not possible.
In polynomials, however, aliases may occur without breaking the transform. Several established sets of polynomial
moments, like in orthogonal raw moment space MRT methods, will comprise :math:`q` polynomials :math:`\mathbf{M}` that in turn are built
out of :math:`r > q` monomial moments :math:`\mathbf{m}`. In that set of monomials, non-independent moments have to be included by definition.
Since the full transformation matrix :math:`M^P = PM` is still invertible, this is not a problem in general. If, however, the
two steps of the transform are computed separately, it becomes problematic, as the matrices :math:`M \in \mathbb{R}^{r \times q}`
and :math:`P \in \mathbb{R}^{q \times r}` are not invertible on their own. 

But there is a remedy. By eliminating aliases from the moment polynomials, they can be reduced to a new set of polynomials based
on a non-aliased reduced vector of monomial moments :math:`\tilde{\mathbf{m}} \in \mathbb{R}^{q}`, expressed through the reduced
matrix :math:`\tilde{P}`.


Interfaces and Usage
====================

Construction
------------

All moment transform classes expect either a sequence of exponent tuples or a sequence of polynomials that define
the set of quantities spanning the destination space. If polynomials are given, the exponent tuples of the underlying
set of monomials are extracted automatically. Depending on the implementation, moment aliases may be eliminated in the
process, altering both the polynomials and the set of monomials.


Forward and Backward Transform
------------------------------

The core functionality of the transform classes is given by the methods ``forward_transform`` and ``backward_transform``.
They return assignment collections containing the equations to compute moments from populations, and vice versa.

Symbols Used
^^^^^^^^^^^^

Unless otherwise specified by the user, monomial and polynomial quantities occur in the transformation equations according
to the naming conventions listed in the following table:

+--------------------------------+---------------------------------------------+----------------------+
|                                |              Monomial                       |    Polynomial        |
+--------------------------------+---------------------------------------------+----------------------+
| Pre-Collision Raw Moment       | :math:`m_{\alpha \beta \gamma}`             | :math:`M_{i}`        |
+--------------------------------+---------------------------------------------+----------------------+
| Post-Collision Raw Moment      | :math:`m_{post, \alpha \beta \gamma}`       | :math:`M_{post, i}`  |
+--------------------------------+---------------------------------------------+----------------------+
| Pre-Collision Central Moment   | :math:`\kappa_{\alpha \beta \gamma}`        | :math:`K_{i}`        |
+--------------------------------+---------------------------------------------+----------------------+
| Post-Collision Central Moment  | :math:`\kappa_{post, \alpha \beta \gamma}`  | :math:`K_{post, i}`  |
+--------------------------------+---------------------------------------------+----------------------+

These symbols are also exposed by the member properties `pre_collision_symbols`, `post_collision_symbols`, 
`pre_collision_monomial_symbols` and `post_collision_monomial_symbols`.

Forward Transform
^^^^^^^^^^^^^^^^^

Implementations of the `lbmpy.moment_transforms.AbstractMomentTransform.forward_transform` method 
derive equations for the transform from population to moment space, to compute pre-collision moments
from pre-collision populations. The returned ``AssignmentCollection`` has the `pre_collision_symbols` 
as left-hand sides of its main assignments, computed from the given ``pdf_symbols`` and, potentially,
the macroscopic density and velocity. Depending on the implementation, the `pre_collision_monomial_symbols`
may be part of the assignment collection in the form of subexpressions. 

Backward Transform
^^^^^^^^^^^^^^^^^^

Implementations of `lbmpy.moment_transforms.AbstractMomentTransform.backward_transform` contain the post-collision
polynomial quantities as free symbols of their equation right-hand sides, and compute the post-collision populations
from those. The PDF symbols are the left-hand sides of the main assignments.


Absorption of Conserved Quantity Equations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Transformations from the population space to any space of observable quantities may *absorb* the equations 
defining the macroscopic quantities entering the equilibrium (typically the density :math:`\rho` and the
velocity :math:`\mathbf{u}`). This means that the ``forward_transform`` will possibly rewrite the
assignments given in the constructor argument ``conserved_quantity_equations`` to reduce
the total operation count. For example, in the transformation step from populations to
raw moments (see `lbmpy.moment_transforms.PdfsToMomentsByChimeraTransform`), :math:`\rho` can be aliased as the zeroth-order moment
:math:`m_{000}`. Assignments to the conserved quantities will then be part of the AssignmentCollection
returned by ``forward_transform`` and need not be added to the collision rule separately. 

Simplification
^^^^^^^^^^^^^^

Both ``forward_transform`` and ``backward_transform`` expect a keyword argument ``simplification``
which can be used to direct simplification steps applied during the derivation of the transformation
equations. Possible values are:

- `False` or ``'none'``: No simplification is to be applied
- `True` or ``'default'``: A default simplification strategy specific to the implementation is applied.
    The actual simplification steps depend strongly on the nature of the equations. They are defined by
    the implementation. It is the responsibility of the implementation to select the most effective
    simplification strategy.
- ``'default_with_cse'``: Same as ``'default'``, but with an additional pass of common subexpression elimination.


Working With Monomials
^^^^^^^^^^^^^^^^^^^^^^

In certain situations, we want the ``forward_transform`` to yield equations for the monomial symbols :math:`m_{\alpha \beta \gamma}`
and :math:`\kappa_{\alpha \beta \gamma}` only, and the ``backward_transform`` to return equations that also expect these symbols as input. 
In this case, it is not sufficient to pass a set of monomials or exponent tuples to the constructor, as those are still treated as 
polynomials internally. Instead, both transform methods expose keyword arguments ``return_monomials`` and ``start_from_monomials``, respectively.
If set to true, equations in the monomial moments are returned. They are best used *only* together with the ``exponent_tuples`` constructor argument
to have full control over the monomials. If polynomials are passed to the constructor, the behaviour of these flags is generally not well-defined,
especially in the presence of aliases.


The Transform Classes
=====================

Abstract Base Class
-------------------

.. autoclass:: lbmpy.moment_transforms.AbstractMomentTransform
    :members:


Moment Space Transforms
-----------------------

.. autoclass:: lbmpy.moment_transforms.PdfsToMomentsByMatrixTransform
    :members:

.. autoclass:: lbmpy.moment_transforms.PdfsToMomentsByChimeraTransform
    :members:


Central Moment Space Transforms
-------------------------------

.. autoclass:: lbmpy.moment_transforms.PdfsToCentralMomentsByMatrix
    :members:

.. autoclass:: lbmpy.moment_transforms.BinomialChimeraTransform
    :members:

.. autoclass:: lbmpy.moment_transforms.FastCentralMomentTransform
    :members:

.. autoclass:: lbmpy.moment_transforms.PdfsToCentralMomentsByShiftMatrix
    :members:

Cumulant Space Transforms
-------------------------

.. autoclass:: lbmpy.moment_transforms.CentralMomentsToCumulantsByGeneratingFunc
    :members:
Original line number Original line Diff line number Diff line
@@ -4,6 +4,10 @@ Tutorials
All tutorials are automatically created by Jupyter Notebooks.
All tutorials are automatically created by Jupyter Notebooks.
You can open the notebooks directly to play around with the code examples.
You can open the notebooks directly to play around with the code examples.


=================
Basics
=================

.. toctree::
.. toctree::
    :maxdepth: 1
    :maxdepth: 1


@@ -13,13 +17,68 @@ You can open the notebooks directly to play around with the code examples.
    /notebooks/03_tutorial_lbm_formulation.ipynb
    /notebooks/03_tutorial_lbm_formulation.ipynb
    /notebooks/04_tutorial_cumulant_LBM.ipynb
    /notebooks/04_tutorial_cumulant_LBM.ipynb
    /notebooks/05_tutorial_nondimensionalization_and_scaling.ipynb
    /notebooks/05_tutorial_nondimensionalization_and_scaling.ipynb

===================
Turbulence modeling
===================

.. toctree::
    :maxdepth: 1

    /notebooks/06_tutorial_modifying_method_smagorinsky.ipynb
    /notebooks/06_tutorial_modifying_method_smagorinsky.ipynb

=================
Thermal flows
=================

.. toctree::
    :maxdepth: 1

    /notebooks/07_tutorial_thermal_lbm.ipynb
    /notebooks/07_tutorial_thermal_lbm.ipynb
    /notebooks/demo_thermalized_lbm.ipynb

=================
Multiphase flows
=================

.. toctree::
    :maxdepth: 1

    /notebooks/08_tutorial_shanchen_twophase.ipynb
    /notebooks/08_tutorial_shanchen_twophase.ipynb
    /notebooks/09_tutorial_shanchen_twocomponent.ipynb
    /notebooks/09_tutorial_shanchen_twocomponent.ipynb
    /notebooks/10_tutorial_conservative_allen_cahn_two_phase.ipynb

========================
Thermocapillary flows
========================

.. toctree::
    :maxdepth: 1

    /notebooks/12_Thermocapillary_flows_heated_channel.ipynb
    /notebooks/13_Thermocapillary_flows_droplet_motion.ipynb

===================
Non Newtonian flow
===================

.. toctree::
    :maxdepth: 1

    /notebooks/11_tutorial_Non_Newtonian_Flow.ipynb

=================
Diverse
=================

.. toctree::
    :maxdepth: 1

    /notebooks/demo_stencils.ipynb
    /notebooks/demo_stencils.ipynb
    /notebooks/demo_streaming_patterns.ipynb
    /notebooks/demo_create_method_from_scratch.ipynb
    /notebooks/demo_create_method_from_scratch.ipynb
    /notebooks/demo_moments_cumulants_and_maxwellian_equilibrium.ipynb
    /notebooks/demo_moments_cumulants_and_maxwellian_equilibrium.ipynb
    /notebooks/demo_automatic_chapman_enskog_analysis.ipynb
    /notebooks/demo_automatic_chapman_enskog_analysis.ipynb
    /notebooks/demo_thermalized_lbm.ipynb
    /notebooks/demo_interpolation_boundary_conditions.ipynb
    /notebooks/demo_shallow_water_lbm.ipynb
    /notebooks/demo_theoretical_background_generic_equilibrium_construction.ipynb
    /notebooks/demo_theoretical_background_generic_equilibrium_construction.ipynb
Original line number Original line Diff line number Diff line
@@ -2,4 +2,4 @@ Bibliography
------------
------------


.. bibliography:: lbmpy.bib
.. bibliography:: lbmpy.bib
   :cited:
   :all:
 No newline at end of file
 No newline at end of file

lbmpy/__init__.py

deleted100644 → 0
+0 −27
Original line number Original line Diff line number Diff line
from .creationfunctions import create_lb_ast, create_lb_collision_rule, create_lb_function,\
    create_lb_method, create_lb_method_from_existing, create_lb_update_rule
from .lbstep import LatticeBoltzmannStep
from .macroscopic_value_kernels import pdf_initialization_assignments, macroscopic_values_getter,\
    compile_macroscopic_values_getter, compile_macroscopic_values_setter, create_advanced_velocity_setter_collision_rule
from .maxwellian_equilibrium import get_weights
from .relaxationrates import relaxation_rate_from_lattice_viscosity, lattice_viscosity_from_relaxation_rate,\
    relaxation_rate_from_magic_number
from .scenarios import create_lid_driven_cavity, create_fully_periodic_flow
from .stencils import get_stencil


__all__ = ['create_lb_ast', 'create_lb_collision_rule', 'create_lb_function', 'create_lb_method',
           'create_lb_method_from_existing', 'create_lb_update_rule',
           'LatticeBoltzmannStep',
           'pdf_initialization_assignments', 'macroscopic_values_getter', 'compile_macroscopic_values_getter',
           'compile_macroscopic_values_setter', 'create_advanced_velocity_setter_collision_rule',
           'get_weights',
           'relaxation_rate_from_lattice_viscosity', 'lattice_viscosity_from_relaxation_rate',
           'relaxation_rate_from_magic_number',
           'create_lid_driven_cavity', 'create_fully_periodic_flow',
           'get_stencil']


from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

lbmpy/boundaries/__init__.py

deleted100644 → 0
+0 −8
Original line number Original line Diff line number Diff line
from lbmpy.boundaries.boundaryconditions import (
    UBB, FixedDensity, DiffusionDirichlet, SimpleExtrapolationOutflow,
    ExtrapolationOutflow, NeumannByCopy, NoSlip, StreamInConstant)
from lbmpy.boundaries.boundaryhandling import LatticeBoltzmannBoundaryHandling

__all__ = ['NoSlip', 'UBB', 'SimpleExtrapolationOutflow', 'ExtrapolationOutflow',
           'FixedDensity', 'DiffusionDirichlet', 'NeumannByCopy',
           'LatticeBoltzmannBoundaryHandling', 'StreamInConstant']

lbmpy/creationfunctions.py

deleted100644 → 0
+0 −687

File deleted.

Preview size limit exceeded, changes collapsed.

lbmpy/forcemodels.py

deleted100644 → 0
+0 −261

File deleted.

Preview size limit exceeded, changes collapsed.

lbmpy/methods/__init__.py

deleted100644 → 0
+0 −20
Original line number Original line Diff line number Diff line
from lbmpy.methods.creationfunctions import (
    create_mrt_orthogonal, create_mrt_raw, create_srt, create_trt, create_trt_kbc,
    create_trt_with_magic_number, create_with_continuous_maxwellian_eq_moments,
    create_with_discrete_maxwellian_eq_moments, mrt_orthogonal_modes_literature,
    create_centered_cumulant_model, create_with_default_polynomial_cumulants,
    create_with_polynomial_cumulants, create_with_monomial_cumulants)

from lbmpy.methods.abstractlbmethod import AbstractLbMethod, RelaxationInfo
from lbmpy.methods.conservedquantitycomputation import AbstractConservedQuantityComputation

from .conservedquantitycomputation import DensityVelocityComputation

__all__ = ['RelaxationInfo', 'AbstractLbMethod',
           'AbstractConservedQuantityComputation', 'DensityVelocityComputation',
           'create_srt', 'create_trt', 'create_trt_with_magic_number', 'create_trt_kbc',
           'create_mrt_orthogonal', 'create_mrt_raw',
           'create_with_continuous_maxwellian_eq_moments', 'create_with_discrete_maxwellian_eq_moments',
           'mrt_orthogonal_modes_literature', 'create_centered_cumulant_model',
           'create_with_default_polynomial_cumulants', 'create_with_polynomial_cumulants',
           'create_with_monomial_cumulants']
+0 −6
Original line number Original line Diff line number Diff line
from .force_model import CenteredCumulantForceModel
from .centeredcumulantmethod import CenteredCumulantBasedLbMethod
from .centered_cumulants import get_default_polynomial_cumulants_for_stencil

__all__ = ['CenteredCumulantForceModel', 'CenteredCumulantBasedLbMethod',
           'get_default_polynomial_cumulants_for_stencil']
Original line number Original line Diff line number Diff line
from lbmpy.stencils import get_stencil
import sympy as sp

from pystencils.stencil import have_same_entries

from lbmpy.moments import MOMENT_SYMBOLS, moment_sort_key, exponent_to_polynomial_representation


def statistical_quantity_symbol(name, exponents):
    return sp.Symbol(f'{name}_{"".join(str(i) for i in exponents)}')


def exponent_tuple_sort_key(x):
    return moment_sort_key(exponent_to_polynomial_representation(x))


def get_default_polynomial_cumulants_for_stencil(stencil):
    """
    Returns default groups of cumulants to be relaxed with common relaxation rates as stated in literature.
    Groups are ordered like this:

    - First group is density
    - Second group are the momentum modes
    - Third group are the shear modes
    - Fourth group is the bulk mode
    - Remaining groups do not govern hydrodynamic properties

    Args:
        stencil: can be D2Q9, D2Q19 or D3Q27
    """
    x, y, z = MOMENT_SYMBOLS
    if have_same_entries(stencil, get_stencil("D2Q9")):
        #   Cumulants of the D2Q9 stencil up to third order are equal to
        #   the central moments; only the fourth-order cumulant x**2 * y**2
        #   has a more complicated form. They can be arranged into groups
        #   for the preservation of rotational invariance as described by
        #   Martin Geier in his dissertation.
        #
        #   Reference: Martin Geier. Ab inito derivation of the cascaded Lattice Boltzmann
        #   Automaton. Dissertation. University of Freiburg. 2006.
        return [
            [sp.sympify(1)],        # density is conserved
            [x, y],                 # momentum is relaxed for cumulant forcing

            [x * y, x**2 - y**2],   # shear

            [x**2 + y**2],          # bulk

            [x**2 * y, x * y**2],
            [x**2 * y**2]
        ]

    elif have_same_entries(stencil, get_stencil("D3Q19")):
        #   D3Q19 cumulants are obtained by pruning the D3Q27 cumulant set as
        #   described by Coreixas, 2019.
        return [
            [sp.sympify(1)],                # density is conserved
            [x, y, z],                      # momentum might be affected by forcing

            [x * y,
             x * z,
             y * z,
             x ** 2 - y ** 2,
             x ** 2 - z ** 2],              # shear

            [x ** 2 + y ** 2 + z ** 2],     # bulk

            [x * y ** 2 + x * z ** 2,
             x ** 2 * y + y * z ** 2,
             x ** 2 * z + y ** 2 * z],

            [x * y ** 2 - x * z ** 2,
             x ** 2 * y - y * z ** 2,
             x ** 2 * z - y ** 2 * z],

            [x ** 2 * y ** 2 - 2 * x ** 2 * z ** 2 + y ** 2 * z ** 2,
             x ** 2 * y ** 2 + x ** 2 * z ** 2 - 2 * y ** 2 * z ** 2],

            [x ** 2 * y ** 2 + x ** 2 * z ** 2 + y ** 2 * z ** 2]
        ]

    elif have_same_entries(stencil, get_stencil("D3Q27")):
        #   Cumulants grouped to preserve rotational invariance as described by Geier et al, 2015
        return [
            [sp.sympify(1)],                # density is conserved
            [x, y, z],                      # momentum might be affected by forcing

            [x * y,
             x * z,
             y * z,
             x ** 2 - y ** 2,
             x ** 2 - z ** 2],              # shear

            [x ** 2 + y ** 2 + z ** 2],     # bulk

            [x * y ** 2 + x * z ** 2,
             x ** 2 * y + y * z ** 2,
             x ** 2 * z + y ** 2 * z],

            [x * y ** 2 - x * z ** 2,
             x ** 2 * y - y * z ** 2,
             x ** 2 * z - y ** 2 * z],

            [x * y * z],

            [x ** 2 * y ** 2 - 2 * x ** 2 * z ** 2 + y ** 2 * z ** 2,
             x ** 2 * y ** 2 + x ** 2 * z ** 2 - 2 * y ** 2 * z ** 2],

            [x ** 2 * y ** 2 + x ** 2 * z ** 2 + y ** 2 * z ** 2],

            [x ** 2 * y * z,
             x * y ** 2 * z,
             x * y * z ** 2],

            [x ** 2 * y ** 2 * z,
             x ** 2 * y * z ** 2,
             x * y ** 2 * z ** 2],

            [x ** 2 * y ** 2 * z ** 2]
        ]
    else:
        raise ValueError("No default set of cumulants is available for this stencil. "
                         "Please specify your own set of polynomial cumulants.")
+0 −29
Original line number Original line Diff line number Diff line
from lbmpy.forcemodels import default_velocity_shift


#   =========================== Centered Cumulant Force Model ==========================================================


class CenteredCumulantForceModel:
    """
    A force model to be used with the centered cumulant-based LB Method.
    It only shifts the macroscopic and equilibrium velocities and does not introduce a forcing term to the
    collision process. Forcing is then applied through relaxation of the first central moments in the shifted frame of
    reference (cf. https://doi.org/10.1016/j.camwa.2015.05.001).

    Args:
        force: force vector which should be applied to the fluid
    """

    def __init__(self, force):
        self._force = force
        self.override_momentum_relaxation_rate = 2

    def __call__(self, lb_method, **kwargs):
        raise Exception('This force model does not provide a forcing term.')

    def macroscopic_velocity_shift(self, density):
        return default_velocity_shift(density, self._force)

    def equilibrium_velocity_shift(self, density):
        return default_velocity_shift(density, self._force)
+0 −70
Original line number Original line Diff line number Diff line
import sympy as sp
from pystencils.sympyextensions import is_constant

#   Subexpression Insertion


def insert_subexpressions(ac, selection_callback, skip=set()):
    i = 0
    while i < len(ac.subexpressions):
        exp = ac.subexpressions[i]
        if exp.lhs not in skip and selection_callback(exp):
            ac = ac.new_with_inserted_subexpression(exp.lhs)
        else:
            i += 1

    return ac


def insert_aliases(ac, **kwargs):
    return insert_subexpressions(ac, lambda x: isinstance(x.rhs, sp.Symbol), **kwargs)


def insert_zeros(ac, **kwargs):
    zero = sp.Integer(0)
    return insert_subexpressions(ac, lambda x: x.rhs == zero, **kwargs)


def insert_constants(ac, **kwargs):
    return insert_subexpressions(ac, lambda x: is_constant(x.rhs), **kwargs)


def insert_symbol_times_minus_one(ac, **kwargs):
    def callback(exp):
        rhs = exp.rhs
        minus_one = sp.Integer(-1)
        return isinstance(rhs, sp.Mul) and \
            len(rhs.args) == 2 and \
            (rhs.args[0] == minus_one or rhs.args[1] == minus_one)
    return insert_subexpressions(ac, callback, **kwargs)


def insert_constant_multiples(ac, **kwargs):
    def callback(exp):
        rhs = exp.rhs
        return isinstance(rhs, sp.Mul) and \
            len(rhs.args) == 2 and \
            (is_constant(rhs.args[0]) or is_constant(rhs.args[1]))
    return insert_subexpressions(ac, callback, **kwargs)


def insert_constant_additions(ac, **kwargs):
    def callback(exp):
        rhs = exp.rhs
        return isinstance(rhs, sp.Add) and \
            len(rhs.args) == 2 and \
            (is_constant(rhs.args[0]) or is_constant(rhs.args[1]))
    return insert_subexpressions(ac, callback, **kwargs)


def insert_squares(ac, **kwargs):
    two = sp.Integer(2)

    def callback(exp):
        rhs = exp.rhs
        return isinstance(rhs, sp.Pow) and rhs.args[1] == two
    return insert_subexpressions(ac, callback, **kwargs)


def bind_symbols_to_skip(insertion_function, skip):
    return lambda ac: insertion_function(ac, skip=skip)
+0 −12
Original line number Original line Diff line number Diff line

def analytic_rising_speed(gravitational_acceleration, bubble_diameter, viscosity_gas):
    r"""
    Calculated the analytical rising speed of a bubble. This is the expected end rising speed.
    Args:
        gravitational_acceleration: the gravitational acceleration acting in the simulation scenario. Usually it gets
                                    calculated based on dimensionless parameters which describe the scenario
        bubble_diameter: the diameter of the bubble at the beginning of the simulation
        viscosity_gas: the viscosity of the fluid inside the bubble
    """
    result = -(gravitational_acceleration * bubble_diameter * bubble_diameter) / (12.0 * viscosity_gas)
    return result

lbmpy/stencils.py

deleted100644 → 0
+0 −106

File deleted.

Preview size limit exceeded, changes collapsed.

lbmpy/turbulence_models.py

deleted100644 → 0
+0 −68

File deleted.

Preview size limit exceeded, changes collapsed.

lbmpy_tests/test_force.py

deleted100644 → 0
+0 −194

File deleted.

Preview size limit exceeded, changes collapsed.

noxfile.py

0 → 100644
+170 −0

File added.

Preview size limit exceeded, changes collapsed.

pyproject.toml

0 → 100644
+92 −0

File added.

Preview size limit exceeded, changes collapsed.

+25 −7

File changed.

Preview size limit exceeded, changes collapsed.

quicktest.py

0 → 100644
+22 −0

File added.

Preview size limit exceeded, changes collapsed.

setup.cfg

deleted100644 → 0
+0 −11

File deleted.

Preview size limit exceeded, changes collapsed.

+14 −106

File changed.

Preview size limit exceeded, changes collapsed.

src/lbmpy/__init__.py

0 → 100644
+61 −0

File added.

Preview size limit exceeded, changes collapsed.

src/lbmpy/_compat.py

0 → 100644
+42 −0

File added.

Preview size limit exceeded, changes collapsed.

src/lbmpy/db.py

0 → 100644
+47 −0

File added.

Preview size limit exceeded, changes collapsed.

src/lbmpy/enums.py

0 → 100644
+238 −0

File added.

Preview size limit exceeded, changes collapsed.

+597 −0

File added.

Preview size limit exceeded, changes collapsed.

src/lbmpy/oldroydb.py

0 → 100644
+210 −0

File added.

Preview size limit exceeded, changes collapsed.

src/lbmpy/stencils.py

0 → 100644
+687 −0

File added.

Preview size limit exceeded, changes collapsed.

src/lbmpy/utils.py

0 → 100644
+28 −0

File added.

Preview size limit exceeded, changes collapsed.

tests/__init__.py

0 → 100644
+0 −0
Original line number Original line Diff line number Diff line