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

Target

Select target project
No results found
Show changes
Commits on Source (245)
Showing with 1434 additions and 7902 deletions
[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
src/lbmpy/_version.py export-subst
__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
RELEASE-VERSION /db
/src/lbmpy/phasefield/simplex_projection.*.so
/src/lbmpy/phasefield/simplex_projection.c
# macOS
**/.DS_Store
*.uuid
# benchmark database
/tests/benchmark/db
\ No newline at end of file
stages: stages:
- pretest
- test - test
- nightly
- docs
- deploy - deploy
# -------------------------- Templates ------------------------------------------------------------------------------------
# -------------------------- Tests ------------------------------------------------------------------------------------ # Base configuration for jobs meant to run at every commit
.every-commit:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
# Configuration for jobs meant to run on each commit to pycodegen/pystencils/master
.every-commit-master:
rules:
- if: '$CI_PIPELINE_SOURCE != "schedule" && $CI_PROJECT_PATH == "pycodegen/lbmpy" && $CI_COMMIT_BRANCH == "master"'
# Base configuration for jobs meant to run at a schedule
.scheduled:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
# -------------------------- Pre 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: tests-and-coverage:
stage: test stage: pretest
except: extends: .every-commit
variables: image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full:cupy12.3
- $ENABLE_NIGHTLY_BUILDS
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
...@@ -22,98 +39,133 @@ tests-and-coverage: ...@@ -22,98 +39,133 @@ tests-and-coverage:
- 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
- env - env
- pip list - pip list
- py.test -v -n $NUM_CORES --cov-report html --cov-report term --cov=. -m "not longrun" --junitxml=report.xml - py.test -v -n $NUM_CORES --cov-report html --cov-report xml --cov-report term --cov=. -m "not longrun" --junitxml=report.xml
- python3 -m coverage xml - python3 -m coverage xml
tags: tags:
- docker - docker
- cuda11 - cuda11
- AVX - AVX
coverage: /Total coverage:\s\d+.\d+\%/
artifacts: artifacts:
when: always when: always
paths: paths:
- coverage_report - coverage_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 # Normal test with longruns
latest-python: tests-and-coverage-with-longrun:
stage: test stage: test
except: when: manual
variables: allow_failure: true
- $ENABLE_NIGHTLY_BUILDS image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
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 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 - mkdir public
- py.test -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml - 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
tags: tags:
- docker - docker
- cuda11
- AVX - AVX
artifacts:
when: always
reports:
junit: report.xml
# Nightly test - runs "long run" jobs only minimal-conda:
test-longrun: stage: pretest
stage: test extends: .every-commit
only: image: i10git.cs.fau.de:5005/pycodegen/pycodegen/minimal_conda
variables: script:
- $ENABLE_NIGHTLY_BUILDS - pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
- pip install -e .
- python quicktest.py
tags:
- docker
# Linter for code formatting
flake8-lint:
stage: pretest
extends: .every-commit
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
script: script:
- env - flake8 src/lbmpy
tags:
- docker
- cuda11
# -------------------------- Tests -------------------------------------------------------------------------------------
# pipeline with latest python version
latest-python:
stage: test
extends: .every-commit
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:
- env
- pip list - 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
- pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils - mkdir public
- py.test -v -n $NUM_CORES --cov-report html --cov-report term --cov=. --junitxml=report.xml - py.test -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
tags: tags:
- docker - docker
- cuda11
- AVX - AVX
artifacts: artifacts:
when: always when: always
paths:
- coverage_report
reports: reports:
junit: report.xml junit: report.xml
# Minimal tests in windows environment # Minimal tests in windows environment
minimal-windows: #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:
stage: test stage: test
except: extends: .every-commit
variables: image: i10git.cs.fau.de:5005/pycodegen/pycodegen/minimal_conda
- $ENABLE_NIGHTLY_BUILDS before_script:
tags: - pip install -e .
- win
script: script:
- source /cygdrive/c/Users/build/Miniconda3/Scripts/activate
- source activate pystencils_dev
- env
- conda env list
- 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
- python -c "import numpy" - python -m pip install --upgrade git+https://github.com/sympy/sympy.git
- python setup.py quicktest - pip list
- python quicktest.py
allow_failure: true
tags:
- docker
- cuda
ubuntu: ubuntu:
stage: test stage: test
except: extends: .every-commit
variables:
- $ENABLE_NIGHTLY_BUILDS
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/ubuntu image: i10git.cs.fau.de:5005/pycodegen/pycodegen/ubuntu
before_script: before_script:
- apt-get -y remove python3-sympy # - apt-get -y remove python3-sympy
- ln -s /usr/include/locale.h /usr/include/xlocale.h - ln -s /usr/include/locale.h /usr/include/xlocale.h
- pip3 install `grep -Eo 'sympy[>=]+[0-9\.]+' setup.py | sed 's/>/=/g'` # - 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 - 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) - export NUM_CORES=$(nproc --all)
...@@ -121,7 +173,7 @@ ubuntu: ...@@ -121,7 +173,7 @@ ubuntu:
- echo "backend:template" > ~/.config/matplotlib/matplotlibrc - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
- env - env
- pip3 list - pip3 list
- pytest-3 -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml - pytest -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
tags: tags:
- docker - docker
- cuda11 - cuda11
...@@ -130,18 +182,6 @@ ubuntu: ...@@ -130,18 +182,6 @@ ubuntu:
reports: reports:
junit: report.xml junit: report.xml
minimal-conda:
stage: test
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
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: test
...@@ -169,7 +209,7 @@ pycodegen-integration: ...@@ -169,7 +209,7 @@ pycodegen-integration:
- make -j $NUM_CORES MicroBenchmarkGpuLbm LbCodeGenerationExample - make -j $NUM_CORES MicroBenchmarkGpuLbm LbCodeGenerationExample
- cd apps/benchmarks/UniformGridGPU - cd apps/benchmarks/UniformGridGPU
- make -j $NUM_CORES - make -j $NUM_CORES
- cd ../UniformGridGenerated - cd ../UniformGridCPU
- make -j $NUM_CORES - make -j $NUM_CORES
tags: tags:
...@@ -177,30 +217,48 @@ pycodegen-integration: ...@@ -177,30 +217,48 @@ pycodegen-integration:
- cuda11 - cuda11
- AVX - AVX
# -------------------- Linter & Documentation -------------------------------------------------------------------------- # -------------------- Scheduled Tasks --------------------------------------------------------------------------
flake8-lint: nightly-sympy:
stage: test stage: nightly
except: extends: .scheduled
variables: image: i10git.cs.fau.de:5005/pycodegen/pycodegen/latest_python
- $ENABLE_NIGHTLY_BUILDS before_script:
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full - 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:
- flake8 lbmpy - env
- pip list
- export NUM_CORES=$(nproc --all)
- mkdir -p ~/.config/matplotlib
- echo "backend:template" > ~/.config/matplotlib/matplotlibrc
- mkdir public
- pytest -v -n $NUM_CORES -m "not longrun" --junitxml=report.xml
tags: tags:
- docker - docker
- cuda11 - AVX
- cuda
artifacts:
when: always
reports:
junit: report.xml
# -------------------- Documentation and deploy ------------------------------------------------------------------------
build-documentation: build-documentation:
stage: test stage: docs
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full needs: []
extends: .every-commit
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
- mkdir html_doc - mkdir html_doc
- sphinx-build -b html doc html_doc
- sphinx-build -W -b html doc html_doc - sphinx-build -W -b html doc html_doc
tags: tags:
- docker - docker
...@@ -212,7 +270,9 @@ build-documentation: ...@@ -212,7 +270,9 @@ build-documentation:
pages: pages:
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
extends: .every-commit-master
stage: deploy stage: deploy
needs: ["tests-and-coverage", "build-documentation"]
script: script:
- ls -l - ls -l
- mv coverage_report html_doc - mv coverage_report html_doc
...@@ -222,5 +282,3 @@ pages: ...@@ -222,5 +282,3 @@ pages:
- public - public
tags: tags:
- docker - docker
only:
- master@pycodegen/lbmpy
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>
# Change Log
## Unreleased
### Removed
* Removing OpenCL support because it is not supported by pystencils anymore
# 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
------------------------ 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
......
include README.md include AUTHORS.txt
include COPYING.txt include CONTRIBUTING.md
include RELEASE-VERSION include CHANGELOG.md
...@@ -16,11 +16,12 @@ It even comes with an integrated Chapman Enskog analysis based on sympy! ...@@ -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 ...@@ -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)
...@@ -7,7 +7,7 @@ ...@@ -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: ...@@ -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
...@@ -4,6 +4,11 @@ import tempfile ...@@ -4,6 +4,11 @@ import tempfile
import runpy import runpy
import sys import sys
import warnings import warnings
import platform
import nbformat
from nbconvert import PythonExporter
import sympy
# 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
from pystencils.cpu import cpujit from pystencils.cpu import cpujit
...@@ -12,11 +17,12 @@ from pystencils.cpu import cpujit ...@@ -12,11 +17,12 @@ from pystencils.cpu import cpujit
# 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 +43,35 @@ def add_path_to_ignore(path): ...@@ -37,32 +43,35 @@ 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')
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 +81,6 @@ for root, sub_dirs, files in os.walk('.'): ...@@ -72,10 +81,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,18 +107,25 @@ class IPyNbTest(pytest.Item): ...@@ -102,18 +107,25 @@ 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):
...@@ -136,10 +148,19 @@ class IPyNbFile(pytest.File): ...@@ -136,10 +148,19 @@ class IPyNbFile(pytest.File):
pass pass
def pytest_collect_file(path, parent): if pytest_version >= 70000:
glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"] # Since pytest 7.0, usage of `py.path.local` is deprecated and `pathlib.Path` should be used instead
if any(path.fnmatch(g) for g in glob_exprs): import pathlib
if pytest_version >= 50403:
return IPyNbFile.from_parent(fspath=path, parent=parent) def pytest_collect_file(file_path: pathlib.Path, parent):
else: glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
return IPyNbFile(path, parent) 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):
glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
if any(path.fnmatch(g) for g in glob_exprs):
if pytest_version >= 50403:
return IPyNbFile.from_parent(fspath=path, parent=parent)
else:
return IPyNbFile(path, parent)
...@@ -5,9 +5,10 @@ import datetime ...@@ -5,9 +5,10 @@ import datetime
import sphinx_rtd_theme import sphinx_rtd_theme
import os import os
import sys import sys
import re
import lbmpy
sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('.'))
from version_from_git import version_number_from_git
extensions = [ extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
...@@ -25,11 +26,14 @@ templates_path = ['_templates'] ...@@ -25,11 +26,14 @@ templates_path = ['_templates']
source_suffix = '.rst' source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
copyright = '{}, Martin Bauer'.format(datetime.datetime.now().year) copyright = f'{datetime.datetime.now().year}, Martin Bauer, Markus Holzer, Frederik Hennig'
author = 'Martin Bauer' author = 'Martin Bauer, Markus Holzer, Frederik Hennig'
version = version_number_from_git() # The short X.Y version (including .devXXXX, rcX, b1 suffixes if present)
release = version_number_from_git() version = re.sub(r'(\d+\.\d+)\.\d+(.*)', r'\1\2', lbmpy.__version__)
language = None version = re.sub(r'(\.dev\d+).*?$', r'\1', version)
# The full version, including alpha/beta/rc tags.
release = lbmpy.__version__
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'
...@@ -57,4 +61,4 @@ autodoc_member_order = 'bysource' ...@@ -57,4 +61,4 @@ autodoc_member_order = 'bysource'
bibtex_bibfiles = ['sphinx/lbmpy.bib'] bibtex_bibfiles = ['sphinx/lbmpy.bib']
project = 'lbmpy' project = 'lbmpy'
html_logo = "img/logo.png" html_logo = 'img/logo.png'
File added
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="190.286" height="190.833" viewBox="0 0 190.286 190.833">
<defs>
<g>
<g id="glyph-0-0">
</g>
<g id="glyph-0-1">
<path d="M 3.5 1.71875 L 3.359375 1.71875 C 3.015625 1.71875 2.828125 1.625 2.84375 1.453125 C 2.84375 1.421875 2.859375 1.390625 2.859375 1.359375 L 4.328125 -3.828125 L 3.671875 -3.828125 L 3.546875 -3.40625 C 3.40625 -3.8125 3.21875 -3.953125 2.859375 -3.953125 C 1.671875 -3.953125 0.21875 -2.3125 0.21875 -0.9375 C 0.21875 -0.3125 0.578125 0.09375 1.140625 0.09375 C 1.78125 0.09375 2.1875 -0.234375 2.984375 -1.375 L 2.1875 1.25 C 2.078125 1.609375 1.921875 1.6875 1.34375 1.734375 L 1.34375 1.875 L 3.5 1.875 Z M 2.875 -3.765625 C 3.171875 -3.765625 3.40625 -3.515625 3.40625 -3.203125 C 3.40625 -2.46875 2.796875 -1.1875 2.1875 -0.6875 C 1.953125 -0.484375 1.71875 -0.375 1.5 -0.375 C 1.1875 -0.375 1 -0.640625 1 -1.0625 C 1 -1.734375 1.46875 -2.71875 2.046875 -3.3125 C 2.328125 -3.59375 2.625 -3.765625 2.875 -3.765625 Z M 2.875 -3.765625 "/>
</g>
<g id="glyph-1-0">
</g>
<g id="glyph-1-1">
<path d="M 3.59375 -1.109375 C 3.234375 -0.65625 3.140625 -0.578125 2.984375 -0.578125 C 2.8125 -0.578125 2.71875 -0.703125 2.65625 -1.046875 L 2.375 -2.453125 C 2.390625 -2.484375 2.40625 -2.5 2.453125 -2.5625 C 2.765625 -3.078125 2.984375 -3.296875 3.1875 -3.296875 C 3.25 -3.296875 3.3125 -3.28125 3.421875 -3.21875 C 3.546875 -3.140625 3.609375 -3.125 3.703125 -3.125 C 3.96875 -3.125 4.203125 -3.34375 4.203125 -3.59375 C 4.203125 -3.890625 3.953125 -4.140625 3.6875 -4.140625 C 3.265625 -4.140625 2.984375 -3.90625 2.265625 -2.90625 C 2.109375 -3.671875 2.03125 -3.890625 1.859375 -4.140625 L 0.375 -3.921875 L 0.375 -3.6875 C 0.5625 -3.703125 0.59375 -3.703125 0.6875 -3.703125 C 0.96875 -3.703125 1.09375 -3.546875 1.1875 -3.109375 L 1.453125 -1.71875 L 1.0625 -1.09375 C 0.875 -0.8125 0.78125 -0.71875 0.625 -0.71875 C 0.578125 -0.71875 0.53125 -0.75 0.4375 -0.796875 C 0.296875 -0.875 0.1875 -0.921875 0.078125 -0.921875 C -0.203125 -0.921875 -0.40625 -0.6875 -0.40625 -0.40625 C -0.40625 -0.09375 -0.171875 0.109375 0.15625 0.109375 C 0.609375 0.109375 0.8125 -0.0625 1.34375 -0.921875 L 1.546875 -1.28125 C 1.6875 -0.59375 1.765625 -0.375 1.953125 -0.109375 C 2.0625 0.03125 2.25 0.109375 2.421875 0.109375 C 2.859375 0.109375 3.234375 -0.1875 3.78125 -0.984375 Z M 3.59375 -1.109375 "/>
</g>
<g id="glyph-1-2">
<path d="M 2.859375 -1.265625 C 2.421875 -0.65625 2.140625 -0.453125 1.765625 -0.453125 C 1.375 -0.453125 1.109375 -0.78125 1.109375 -1.265625 C 1.109375 -1.828125 1.34375 -2.625 1.65625 -3.203125 C 1.890625 -3.625 2.15625 -3.84375 2.4375 -3.84375 C 2.53125 -3.84375 2.625 -3.78125 2.625 -3.6875 C 2.625 -3.65625 2.609375 -3.609375 2.5625 -3.53125 C 2.46875 -3.375 2.4375 -3.28125 2.4375 -3.171875 C 2.4375 -2.90625 2.65625 -2.703125 2.953125 -2.703125 C 3.28125 -2.703125 3.515625 -2.96875 3.515625 -3.34375 C 3.515625 -3.8125 3.109375 -4.140625 2.515625 -4.140625 C 1.25 -4.140625 -0.046875 -2.671875 -0.046875 -1.234375 C -0.046875 -0.4375 0.515625 0.109375 1.328125 0.109375 C 1.71875 0.109375 2.109375 -0.03125 2.40625 -0.28125 C 2.640625 -0.484375 2.796875 -0.65625 3.109375 -1.109375 Z M 2.859375 -1.265625 "/>
</g>
<g id="glyph-2-0">
</g>
<g id="glyph-2-1">
<path d="M 3.859375 -3.90625 L 0.875 -3.90625 L 0.875 -3.8125 C 1.265625 -3.78125 1.34375 -3.734375 1.34375 -3.5625 C 1.34375 -3.484375 1.3125 -3.328125 1.28125 -3.1875 L 0.53125 -0.53125 C 0.4375 -0.171875 0.390625 -0.140625 0.046875 -0.09375 L 0.046875 0 L 1.5625 0 L 1.5625 -0.09375 C 1.203125 -0.109375 1.09375 -0.171875 1.09375 -0.359375 C 1.09375 -0.40625 1.125 -0.5 1.15625 -0.625 L 1.53125 -1.96875 C 1.75 -1.953125 1.875 -1.9375 2.015625 -1.9375 C 2.25 -1.9375 2.28125 -1.9375 2.34375 -1.921875 C 2.421875 -1.859375 2.46875 -1.796875 2.46875 -1.671875 C 2.46875 -1.578125 2.453125 -1.5 2.421875 -1.3125 L 2.53125 -1.28125 L 2.984375 -2.6875 L 2.875 -2.71875 C 2.609375 -2.171875 2.578125 -2.171875 1.578125 -2.15625 L 1.96875 -3.546875 C 2.015625 -3.671875 2.09375 -3.703125 2.34375 -3.703125 C 3.34375 -3.703125 3.5625 -3.625 3.5625 -3.265625 C 3.5625 -3.21875 3.5625 -3.203125 3.546875 -3.125 C 3.546875 -3.078125 3.546875 -3.078125 3.546875 -3 L 3.671875 -2.984375 Z M 3.859375 -3.90625 "/>
</g>
<g id="glyph-2-2">
<path d="M 0.65625 -3.84375 C 1.015625 -3.84375 1.046875 -3.8125 1.046875 -3.6875 C 1.046875 -3.625 1.03125 -3.5625 1 -3.421875 C 0.984375 -3.390625 0.96875 -3.34375 0.96875 -3.3125 L 0.953125 -3.265625 L 0.140625 -0.28125 L 0.140625 -0.25 C 0.140625 -0.109375 0.59375 0.0625 0.9375 0.0625 C 1.84375 0.0625 2.828125 -0.984375 2.828125 -1.921875 C 2.828125 -2.34375 2.53125 -2.640625 2.140625 -2.640625 C 1.71875 -2.640625 1.40625 -2.390625 0.984375 -1.734375 C 1.296875 -2.875 1.328125 -3.03125 1.609375 -4.0625 L 1.578125 -4.09375 C 1.28125 -4.03125 1.0625 -4 0.65625 -3.953125 Z M 1.90625 -2.34375 C 2.15625 -2.34375 2.328125 -2.140625 2.328125 -1.828125 C 2.328125 -1.4375 2.015625 -0.796875 1.65625 -0.421875 C 1.4375 -0.203125 1.1875 -0.078125 0.921875 -0.078125 C 0.734375 -0.078125 0.65625 -0.140625 0.65625 -0.28125 C 0.65625 -0.640625 0.828125 -1.21875 1.078125 -1.65625 C 1.34375 -2.125 1.609375 -2.34375 1.90625 -2.34375 Z M 1.90625 -2.34375 "/>
</g>
<g id="glyph-2-3">
<path d="M 5.421875 -3.90625 L 4.3125 -3.90625 L 4.3125 -3.8125 C 4.640625 -3.78125 4.703125 -3.734375 4.703125 -3.578125 C 4.703125 -3.484375 4.65625 -3.328125 4.578125 -3.171875 L 3.453125 -0.96875 L 3.21875 -3.375 L 3.21875 -3.453125 C 3.21875 -3.703125 3.296875 -3.78125 3.625 -3.8125 L 3.625 -3.90625 L 2.203125 -3.90625 L 2.203125 -3.8125 C 2.546875 -3.796875 2.609375 -3.765625 2.640625 -3.46875 L 2.703125 -3.046875 L 1.671875 -0.96875 L 1.40625 -3.40625 C 1.40625 -3.421875 1.40625 -3.46875 1.40625 -3.484375 C 1.40625 -3.71875 1.46875 -3.765625 1.84375 -3.8125 L 1.84375 -3.90625 L 0.421875 -3.90625 L 0.421875 -3.8125 C 0.625 -3.78125 0.671875 -3.765625 0.734375 -3.71875 C 0.796875 -3.65625 0.828125 -3.53125 0.890625 -2.984375 L 1.265625 0.109375 L 1.375 0.109375 L 2.703125 -2.609375 L 2.734375 -2.609375 L 3.046875 0.109375 L 3.15625 0.109375 L 4.96875 -3.375 C 5.140625 -3.6875 5.1875 -3.734375 5.421875 -3.8125 Z M 5.421875 -3.90625 "/>
</g>
<g id="glyph-3-0">
</g>
<g id="glyph-3-1">
<path d="M 1.90625 -0.84375 C 1.609375 -0.4375 1.4375 -0.3125 1.171875 -0.3125 C 0.921875 -0.3125 0.734375 -0.515625 0.734375 -0.84375 C 0.734375 -1.21875 0.890625 -1.75 1.109375 -2.140625 C 1.265625 -2.421875 1.4375 -2.5625 1.625 -2.5625 C 1.6875 -2.5625 1.75 -2.53125 1.75 -2.46875 C 1.75 -2.4375 1.734375 -2.40625 1.703125 -2.359375 C 1.65625 -2.25 1.625 -2.1875 1.625 -2.125 C 1.625 -1.9375 1.78125 -1.8125 1.96875 -1.8125 C 2.1875 -1.8125 2.34375 -1.984375 2.34375 -2.21875 C 2.34375 -2.546875 2.078125 -2.765625 1.671875 -2.765625 C 0.828125 -2.765625 -0.03125 -1.78125 -0.03125 -0.828125 C -0.03125 -0.296875 0.34375 0.078125 0.890625 0.078125 C 1.15625 0.078125 1.40625 -0.015625 1.609375 -0.1875 C 1.765625 -0.328125 1.859375 -0.4375 2.078125 -0.734375 Z M 1.90625 -0.84375 "/>
</g>
<g id="glyph-3-2">
<path d="M 1.296875 -0.84375 L 1.203125 -0.71875 C 1.046875 -0.484375 0.921875 -0.359375 0.828125 -0.359375 C 0.78125 -0.359375 0.734375 -0.40625 0.734375 -0.453125 C 0.734375 -0.484375 0.765625 -0.6875 0.796875 -0.765625 L 1.328125 -2.765625 C 1.015625 -2.6875 0.59375 -2.640625 0.125 -2.59375 L 0.125 -2.4375 C 0.390625 -2.4375 0.484375 -2.390625 0.484375 -2.265625 C 0.484375 -2.21875 0.453125 -2.125 0.4375 -2.015625 L 0.09375 -0.734375 C 0.046875 -0.5625 0.015625 -0.40625 0.015625 -0.328125 C 0.015625 -0.109375 0.171875 0.046875 0.421875 0.046875 C 0.78125 0.046875 1 -0.125 1.421875 -0.765625 Z M 1.15625 -4.09375 C 0.953125 -4.09375 0.765625 -3.90625 0.765625 -3.703125 C 0.765625 -3.46875 0.9375 -3.296875 1.15625 -3.296875 C 1.390625 -3.296875 1.578125 -3.46875 1.578125 -3.6875 C 1.578125 -3.90625 1.375 -4.09375 1.15625 -4.09375 Z M 1.15625 -4.09375 "/>
</g>
<g id="glyph-4-0">
</g>
<g id="glyph-4-1">
<path d="M 1.078125 -0.703125 L 1 -0.609375 C 0.875 -0.40625 0.765625 -0.296875 0.6875 -0.296875 C 0.640625 -0.296875 0.609375 -0.34375 0.609375 -0.375 C 0.609375 -0.40625 0.640625 -0.578125 0.65625 -0.640625 L 1.109375 -2.296875 C 0.84375 -2.25 0.5 -2.1875 0.109375 -2.15625 L 0.109375 -2.03125 C 0.3125 -2.03125 0.40625 -1.984375 0.40625 -1.890625 C 0.40625 -1.84375 0.390625 -1.765625 0.359375 -1.6875 L 0.078125 -0.609375 C 0.03125 -0.46875 0.015625 -0.328125 0.015625 -0.265625 C 0.015625 -0.078125 0.15625 0.046875 0.359375 0.046875 C 0.65625 0.046875 0.84375 -0.109375 1.1875 -0.640625 Z M 0.96875 -3.421875 C 0.796875 -3.421875 0.640625 -3.265625 0.640625 -3.078125 C 0.640625 -2.890625 0.78125 -2.734375 0.96875 -2.734375 C 1.15625 -2.734375 1.3125 -2.890625 1.3125 -3.078125 C 1.3125 -3.265625 1.15625 -3.421875 0.96875 -3.421875 Z M 0.96875 -3.421875 "/>
</g>
<g id="glyph-5-0">
</g>
<g id="glyph-5-1">
<path d="M 1.65625 -3.171875 L 0 -3.171875 L 0 -2.8125 L 1.65625 -2.8125 Z M 1.65625 -3.171875 "/>
</g>
</g>
<clipPath id="clip-0">
<path clip-rule="nonzero" d="M 59 32 L 190.285156 32 L 190.285156 190.832031 L 59 190.832031 Z M 59 32 "/>
</clipPath>
</defs>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -9.962062 -0.00015625 L 159.405125 -0.00015625 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -9.962062 49.812344 L 159.405125 49.812344 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -9.962062 99.62875 L 159.405125 99.62875 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -9.962062 149.44125 L 159.405125 149.44125 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.001125 -9.961094 L -0.001125 159.406094 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 49.815281 -9.961094 L 49.815281 159.406094 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 99.627781 -9.961094 L 99.627781 159.406094 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 149.440281 -9.961094 L 149.440281 159.406094 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.390625%, 45.097351%, 69.802856%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4.698094 -0.00015625 C 4.698094 2.593594 2.592625 4.695156 -0.001125 4.695156 C -2.594875 4.695156 -4.696437 2.593594 -4.696437 -0.00015625 C -4.696437 -2.593906 -2.594875 -4.695469 -0.001125 -4.695469 C 2.592625 -4.695469 4.698094 -2.593906 4.698094 -0.00015625 Z M 4.698094 -0.00015625 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.390625%, 45.097351%, 69.802856%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4.698094 49.812344 C 4.698094 52.406094 2.592625 54.511562 -0.001125 54.511562 C -2.594875 54.511562 -4.696437 52.406094 -4.696437 49.812344 C -4.696437 47.218594 -2.594875 45.117031 -0.001125 45.117031 C 2.592625 45.117031 4.698094 47.218594 4.698094 49.812344 Z M 4.698094 49.812344 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.390625%, 45.097351%, 69.802856%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4.698094 99.62875 C 4.698094 102.2225 2.592625 104.324062 -0.001125 104.324062 C -2.594875 104.324062 -4.696437 102.2225 -4.696437 99.62875 C -4.696437 97.035 -2.594875 94.929531 -0.001125 94.929531 C 2.592625 94.929531 4.698094 97.035 4.698094 99.62875 Z M 4.698094 99.62875 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.390625%, 45.097351%, 69.802856%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4.698094 149.44125 C 4.698094 152.035 2.592625 154.136562 -0.001125 154.136562 C -2.594875 154.136562 -4.696437 152.035 -4.696437 149.44125 C -4.696437 146.8475 -2.594875 144.745937 -0.001125 144.745937 C 2.592625 144.745937 4.698094 146.8475 4.698094 149.44125 Z M 4.698094 149.44125 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(87.057495%, 56.077576%, 1.959229%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 54.510594 -0.00015625 C 54.510594 2.593594 52.409031 4.695156 49.815281 4.695156 C 47.221531 4.695156 45.116062 2.593594 45.116062 -0.00015625 C 45.116062 -2.593906 47.221531 -4.695469 49.815281 -4.695469 C 52.409031 -4.695469 54.510594 -2.593906 54.510594 -0.00015625 Z M 54.510594 -0.00015625 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(87.057495%, 56.077576%, 1.959229%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 54.510594 49.812344 C 54.510594 52.406094 52.409031 54.511562 49.815281 54.511562 C 47.221531 54.511562 45.116062 52.406094 45.116062 49.812344 C 45.116062 47.218594 47.221531 45.117031 49.815281 45.117031 C 52.409031 45.117031 54.510594 47.218594 54.510594 49.812344 Z M 54.510594 49.812344 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(87.057495%, 56.077576%, 1.959229%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 54.510594 99.62875 C 54.510594 102.2225 52.409031 104.324062 49.815281 104.324062 C 47.221531 104.324062 45.116062 102.2225 45.116062 99.62875 C 45.116062 97.035 47.221531 94.929531 49.815281 94.929531 C 52.409031 94.929531 54.510594 97.035 54.510594 99.62875 Z M 54.510594 99.62875 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.390625%, 45.097351%, 69.802856%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 54.510594 149.44125 C 54.510594 152.035 52.409031 154.136562 49.815281 154.136562 C 47.221531 154.136562 45.116062 152.035 45.116062 149.44125 C 45.116062 146.8475 47.221531 144.745937 49.815281 144.745937 C 52.409031 144.745937 54.510594 146.8475 54.510594 149.44125 Z M 54.510594 149.44125 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.782776%, 61.959839%, 45.097351%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 104.323094 -0.00015625 C 104.323094 2.593594 102.221531 4.695156 99.627781 4.695156 C 97.034031 4.695156 94.932469 2.593594 94.932469 -0.00015625 C 94.932469 -2.593906 97.034031 -4.695469 99.627781 -4.695469 C 102.221531 -4.695469 104.323094 -2.593906 104.323094 -0.00015625 Z M 104.323094 -0.00015625 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.782776%, 61.959839%, 45.097351%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 104.323094 49.812344 C 104.323094 52.406094 102.221531 54.511562 99.627781 54.511562 C 97.034031 54.511562 94.932469 52.406094 94.932469 49.812344 C 94.932469 47.218594 97.034031 45.117031 99.627781 45.117031 C 102.221531 45.117031 104.323094 47.218594 104.323094 49.812344 Z M 104.323094 49.812344 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(87.057495%, 56.077576%, 1.959229%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 104.323094 99.62875 C 104.323094 102.2225 102.221531 104.324062 99.627781 104.324062 C 97.034031 104.324062 94.932469 102.2225 94.932469 99.62875 C 94.932469 97.035 97.034031 94.929531 99.627781 94.929531 C 102.221531 94.929531 104.323094 97.035 104.323094 99.62875 Z M 104.323094 99.62875 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(87.057495%, 56.077576%, 1.959229%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 104.323094 149.44125 C 104.323094 152.035 102.221531 154.136562 99.627781 154.136562 C 97.034031 154.136562 94.932469 152.035 94.932469 149.44125 C 94.932469 146.8475 97.034031 144.745937 99.627781 144.745937 C 102.221531 144.745937 104.323094 146.8475 104.323094 149.44125 Z M 104.323094 149.44125 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.782776%, 61.959839%, 45.097351%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 154.1395 -0.00015625 C 154.1395 2.593594 152.034031 4.695156 149.440281 4.695156 C 146.846531 4.695156 144.744969 2.593594 144.744969 -0.00015625 C 144.744969 -2.593906 146.846531 -4.695469 149.440281 -4.695469 C 152.034031 -4.695469 154.1395 -2.593906 154.1395 -0.00015625 Z M 154.1395 -0.00015625 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.782776%, 61.959839%, 45.097351%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 154.1395 49.812344 C 154.1395 52.406094 152.034031 54.511562 149.440281 54.511562 C 146.846531 54.511562 144.744969 52.406094 144.744969 49.812344 C 144.744969 47.218594 146.846531 45.117031 149.440281 45.117031 C 152.034031 45.117031 154.1395 47.218594 154.1395 49.812344 Z M 154.1395 49.812344 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0.782776%, 61.959839%, 45.097351%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 154.1395 99.62875 C 154.1395 102.2225 152.034031 104.324062 149.440281 104.324062 C 146.846531 104.324062 144.744969 102.2225 144.744969 99.62875 C 144.744969 97.035 146.846531 94.929531 149.440281 94.929531 C 152.034031 94.929531 154.1395 97.035 154.1395 99.62875 Z M 154.1395 99.62875 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(87.057495%, 56.077576%, 1.959229%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 154.1395 149.44125 C 154.1395 152.035 152.034031 154.136562 149.440281 154.136562 C 146.846531 154.136562 144.744969 152.035 144.744969 149.44125 C 144.744969 146.8475 146.846531 144.745937 149.440281 144.745937 C 152.034031 144.745937 154.1395 146.8475 154.1395 149.44125 Z M 154.1395 149.44125 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0%, 0%, 0%)" fill-opacity="1" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 88.381687 65.75375 C 88.381687 68.3475 86.280125 70.449062 83.686375 70.449062 C 81.092625 70.449062 78.991062 68.3475 78.991062 65.75375 C 78.991062 63.16 81.092625 61.058437 83.686375 61.058437 C 86.280125 61.058437 88.381687 63.16 88.381687 65.75375 Z M 88.381687 65.75375 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<g clip-path="url(#clip-0)">
<path fill="none" stroke-width="1.99255" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 149.440281 109.589687 C 95.252781 100.035 59.073094 48.363125 68.627781 -5.824375 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
</g>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-dasharray="2.98883 2.98883" stroke-miterlimit="10" d="M 4.98325 144.460781 L 44.830906 104.609219 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-dasharray="2.98883 2.98883" stroke-miterlimit="10" d="M 54.79575 94.644375 L 94.647312 54.796719 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 55.842625 96.589687 L 79.702 72.726406 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0%, 0%, 0%)" fill-opacity="1" d="M 74.222656 71.777344 L 75.855469 76.683594 L 76.265625 73.820312 L 79.125 73.414062 "/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 53.799656 92.652187 L 77.659031 68.792812 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0%, 0%, 0%)" fill-opacity="1" d="M 100.125 103.660156 L 98.492188 98.757812 L 98.082031 101.617188 L 95.222656 102.023438 "/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 7.026219 145.406094 L 44.830906 107.5975 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0%, 0%, 0%)" fill-opacity="1" d="M 25.40625 22.960938 L 27.039062 27.863281 L 27.449219 25.003906 L 30.308594 24.59375 "/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-dasharray="2.98883 2.98883" stroke-miterlimit="10" d="M 19.924656 65.75375 L 83.686375 65.75375 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill="none" stroke-width="0.99628" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 24.905125 68.644375 L 24.905125 96.738125 " transform="matrix(1, 0, 0, -1, 20.423, 170.41)"/>
<path fill-rule="nonzero" fill="rgb(0%, 0%, 0%)" fill-opacity="1" d="M 45.328125 104.65625 L 47.640625 100.03125 L 45.328125 101.765625 L 43.019531 100.03125 "/>
<path fill-rule="nonzero" fill="rgb(0%, 0%, 0%)" fill-opacity="1" d="M 45.328125 70.78125 L 43.019531 75.40625 L 45.328125 73.671875 L 47.640625 75.40625 "/>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-1" x="39.103" y="89.761"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-1-1" x="24.961" y="17.349"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-2-1" x="29.594" y="18.694"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-2-1" x="33.748432" y="18.694"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-1-1" x="76.852" y="67.163"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-2-1" x="81.484" y="68.507"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-1-1" x="127.248" y="116.953"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-2-2" x="131.731" y="118.298"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-1-1" x="110.094" y="105.968"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-2-3" x="114.577" y="107.312"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-1" x="90.172" y="85.461"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-3-1" x="94.954" y="86.806"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-4-1" x="97.733" y="87.934"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-1" x="75.228" y="91.006"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-3-1" x="80.01" y="92.351"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-5-1" x="82.639" y="93.298"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-4-1" x="82.789" y="94.344"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-1-2" x="42.409" y="37.257"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-3-2" x="46.539" y="38.602"/>
</g>
</svg>
File added
No preview for this file type
doc/img/feature_optimization_overview.png

135 KiB

This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,9 @@ lbmpy ...@@ -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
......