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
  • Sparse
  • WallLaw
  • fhennig/pystencils2.0-compat
  • fhennig/zero-centered-fluctuating
  • improved_comm
  • master
  • ravi/hidalgo_showcases
  • ravi/thermalPSM
  • 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
46 results
Show changes
288 files
+ 21665
5635
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
+10 −6
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
@@ -15,14 +15,18 @@ _local_tmp
**/pylintrc
**/pylintrc
*.bak
*.bak
*.tmp
*.tmp
/lbmpy_tests/db
/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

test-report
report.xml


# macOS
# macOS
**/.DS_Store
**/.DS_Store
*.uuid


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


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


# --------------------------  Pre 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: pretest
  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:
    # - pip install sympy --upgrade
    - 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+\%/
  coverage: /Total coverage:\s\d+.\d+\%/
  artifacts:
  artifacts:
    when: always
    when: always
    paths:
    paths:
      - coverage_report
      - coverage_report
      - test-report
    reports:
    reports:
      coverage_report:
      coverage_report:
        coverage_format: cobertura
        coverage_format: cobertura
        path: coverage.xml
        path: coverage.xml
      junit: report.xml
      junit: report.xml



testsuite-cpu-py3.13:
  stage: "Tests"
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/nox:alpine
  needs: []
  script:
    - mkdir -p ~/.config/matplotlib
    - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
    - nox -s "testsuite_cpu-3.13"
  tags:
    - docker
    - AVX
  artifacts:
    when: always
    paths:
      - test-report
    reports:
      junit: report.xml


# Normal test with longruns
# Normal test with longruns
tests-and-coverage-with-longrun:
tests-and-coverage-with-longrun:
  stage: test
  stage: "Tests"
  when: manual
  when: manual
  allow_failure: true
  allow_failure: true
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
@@ -57,161 +86,120 @@ tests-and-coverage-with-longrun:
    - py.test -v -n $NUM_CORES
    - py.test -v -n $NUM_CORES
  tags:
  tags:
    - docker
    - docker
    - cuda11
    - cuda
    - cudaComputeCapability6.1
    - AVX
    - AVX


minimal-conda:
# --------------------------  Nightly and Pre-Release Tests --------------------------------------------------------------------------------
  stage: pretest
  except:
    variables:
      - $ENABLE_NIGHTLY_BUILDS
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/minimal_conda
  script:
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    - python setup.py quicktest
  tags:
    - docker


# Linter for code formatting
# Test against latest pystencils 2.0 development version
flake8-lint:
pystencils-2.0dev:
  stage: pretest
  stage: "Prerelease-Tests"
  except:
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/nox:ubuntu24.04-cuda12.6
    variables:
  allow_failure: true
      - $ENABLE_NIGHTLY_BUILDS
  needs: []
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  script:
    - flake8 lbmpy
  tags:
    - docker
    - cuda11

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

# pipeline with latest python version
latest-python:
  stage: test
  except:
    variables:
      - $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_pystencils2(cupy12)"
    - py.test -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
  tags:
  tags:
    - docker
    - docker
    - AVX
    - AVX
    - cuda
    - cudaComputeCapability6.1
  artifacts:
  artifacts:
    when: always
    when: always
    paths:
      - test-report
    reports:
    reports:
      junit: report.xml
      junit: report.xml


# Minimal tests in windows environment
minimal-windows:
  stage: test
  except:
    variables:
      - $ENABLE_NIGHTLY_BUILDS
  tags:
    - win
  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
    - python -c "import numpy"
    - pip install sympy==1.9
    - py.test -v -m "not (notebook or longrun)"

minimal-sympy-master:
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 -m pip install --upgrade git+https://github.com/sympy/sympy.git
    - pip list
    - python setup.py quicktest
  allow_failure: true
  allow_failure: true
  tags:
  tags:
    - docker
    - docker
    - cuda


ubuntu:
# pycodegen-integration:
  stage: test
#   image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  except:
#   stage: integration
    variables:
#   when: manual
      - $ENABLE_NIGHTLY_BUILDS
#   allow_failure: true
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/ubuntu
#   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:
  before_script:
    # - apt-get -y remove python3-sympy
    - pip install -e .
    - ln -s /usr/include/locale.h /usr/include/xlocale.h
    - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
    # - pip3 install `grep -Eo 'sympy[>=]+[0-9\.]+' setup.py | sed 's/>/=/g'`
    - pip install --upgrade --pre sympy
    - pip3 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)
    - 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
    - mkdir public
    - pip3 list
    - pytest -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
    - 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
    reports:
    reports:
      junit: report.xml
      junit: report.xml


pycodegen-integration:
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
  stage: test
  when: manual
  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
    - cuda11
    - AVX


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


build-documentation:
build-documentation:
  stage: test
  stage: docs
  needs: []
  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/documentation
  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
@@ -219,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
@@ -227,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
@@ -237,5 +229,3 @@ pages:
      - public
      - public
  tags:
  tags:
    - docker
    - docker
  only:
    - master@pycodegen/lbmpy
+1 −0
Original line number Original line Diff line number Diff line
@@ -11,3 +11,4 @@ Contributors:
  - Rudolf Weeber <weeber@icp.uni-stuttgart.de>
  - Rudolf Weeber <weeber@icp.uni-stuttgart.de>
  - Christian Godenschwager <christian.godenschwager@fau.de>
  - Christian Godenschwager <christian.godenschwager@fau.de>
  - Jan Hönig <jan.hoenig@fau.de>
  - Jan Hönig <jan.hoenig@fau.de>
  - Philipp Suffa <philipp.suffa@fau.de>
+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


+1 −5
Original line number Original line Diff line number Diff line
include README.md
include COPYING.txt
include AUTHORS.txt
include AUTHORS.txt
include CONTRIBUTING.md
include CONTRIBUTING.md
global-include *.pyx
include CHANGELOG.md
include versioneer.py
include lbmpy/_version.py
+1 −0
Original line number Original line Diff line number Diff line
@@ -71,6 +71,7 @@ Many thanks go to the [contributors](https://i10git.cs.fau.de/pycodegen/lbmpy/-/
If you use lbmpy in a publication, please cite the following articles:
If you use lbmpy in a publication, please cite the following articles:


Overview:
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))
  - 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:
Multiphase:
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
+51 −21
Original line number Original line Diff line number Diff line
@@ -5,12 +5,17 @@ import runpy
import sys
import sys
import warnings
import warnings
import platform
import platform
import pathlib


import nbformat
import nbformat
from nbconvert import PythonExporter
import nbconvert
import sympy
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
@@ -19,9 +24,9 @@ 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'))
@@ -42,33 +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_datahandling_parallel.py")]
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "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,
                       os.path.join(SCRIPT_FOLDER,
                                    "lbmpy_tests/full_scenarios/kida_vortex_flow/scenario_kida_vortex_flow.py")]
                                    "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':
if platform.system().lower() == 'windows':
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "lbmpy_tests/test_quicktests.py")]
    collect_ignore += [os.path.join(SCRIPT_FOLDER, "tests/test_quicktests.py")]


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')]


@@ -104,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


@@ -138,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):
+1 −1
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ 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