diff --git a/lbmpy/stencils.py b/lbmpy/stencils.py index ffd64a91625c1ffec01675e69958c81bb5d9ab7f..24a7ec53890d97ec7a0cb1e9ca67c13b461e70dd 100644 --- a/lbmpy/stencils.py +++ b/lbmpy/stencils.py @@ -112,6 +112,7 @@ class LBStencil: table = """ <table style="border:none; width: 100%"> <tr {nb}> + <th {nb} >Nr.</th> <th {nb} >Direction Name</th> <th {nb} >Direction </th> </tr> @@ -119,13 +120,15 @@ class LBStencil: </table> """ content = "" - for direction in self._stencil_entries: + for i, direction in enumerate(self._stencil_entries): vals = { + 'nr': sp.latex(i), 'name': sp.latex(ps.stencil.offset_to_direction_string(direction)), 'entry': sp.latex(direction), 'nb': 'style="border:none"' } content += """<tr {nb}> + <td {nb}>${nr}$</td> <td {nb}>${name}$</td> <td {nb}>${entry}$</td> </tr>\n""".format(**vals) @@ -188,16 +191,16 @@ def _predefined_stencils(stencil: str, ordering: str): (-1, 1, 0), (1, 1, 0), (-1, -1, 0), (1, -1, 0), (0, 1, 1), (0, -1, 1), (-1, 0, 1), (1, 0, 1), (0, 1, -1), (0, -1, -1), (-1, 0, -1), (1, 0, -1)), + 'counterclockwise': ((0, 0, 0), + (1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0), (0, 0, 1), (0, 0, -1), + (1, 1, 0), (-1, -1, 0), (1, 0, 1), (-1, 0, -1), + (0, 1, 1), (0, -1, -1), (1, -1, 0), (-1, 1, 0), + (1, 0, -1), (-1, 0, 1), (0, 1, -1), (0, -1, 1)), 'braunschweig': ((0, 0, 0), - (1, 0, 0), (-1, 0, 0), - (0, 1, 0), (0, -1, 0), - (0, 0, 1), (0, 0, -1), - (1, 1, 0), (-1, -1, 0), - (1, -1, 0), (-1, 1, 0), - (1, 0, 1), (-1, 0, -1), - (1, 0, -1), (-1, 0, 1), - (0, 1, 1), (0, -1, -1), - (0, 1, -1), (0, -1, 1)), + (1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0), (0, 0, 1), (0, 0, -1), + (1, 1, 0), (-1, -1, 0), (1, -1, 0), (-1, 1, 0), + (1, 0, 1), (-1, 0, -1), (1, 0, -1), (-1, 0, 1), + (0, 1, 1), (0, -1, -1), (0, 1, -1), (0, -1, 1)), 'premnath': ((0, 0, 0), (1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0), (0, 0, 1), (0, 0, -1), (1, 1, 0), (-1, 1, 0), (1, -1, 0), (-1, -1, 0), diff --git a/setup.py b/setup.py index ef9b99cd686a2629e95c57e71d884e302a65afb5..ebc9acdf17a38530ddc3d46f819b503e2015d2ac 100644 --- a/setup.py +++ b/setup.py @@ -78,6 +78,7 @@ def get_cmdclass(): return cmdclass +major_version = versioneer.get_version().split("+")[0] setup(name='lbmpy', version=versioneer.get_version(), description='Code Generation for Lattice Boltzmann Methods', @@ -88,9 +89,8 @@ setup(name='lbmpy', author_email='cs10-codegen@fau.de', url='https://i10git.cs.fau.de/pycodegen/lbmpy/', packages=['lbmpy'] + ['lbmpy.' + s for s in find_packages('lbmpy')], - install_requires=['pystencils>=0.4.0', 'sympy>=1.5.1,<=1.9', 'numpy>=1.11.0'], - package_data={'lbmpy': ['phasefield/simplex_projection.pyx', - 'phasefield/simplex_projection.c']}, + install_requires=[f'pystencils>=0.4.0,<={major_version}', 'sympy>=1.5.1,<=1.9', 'numpy>=1.11.0'], + package_data={'lbmpy': ['phasefield/simplex_projection.pyx', 'phasefield/simplex_projection.c']}, ext_modules=cython_extensions("lbmpy.phasefield.simplex_projection"), classifiers=[ 'Development Status :: 4 - Beta',