Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
686ec0bb
Commit
686ec0bb
authored
3 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed doc
parent
ddea6da8
No related branches found
No related tags found
1 merge request
!93
Dataclasses for method creation
Pipeline
#34328
failed
3 years ago
Stage: pretest
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/sphinx/api.rst
+1
-0
1 addition, 0 deletions
doc/sphinx/api.rst
doc/sphinx/enums.rst
+6
-0
6 additions, 0 deletions
doc/sphinx/enums.rst
lbmpy/creationfunctions.py
+8
-8
8 additions, 8 deletions
lbmpy/creationfunctions.py
lbmpy/enums.py
+0
-1
0 additions, 1 deletion
lbmpy/enums.py
with
15 additions
and
9 deletions
doc/sphinx/api.rst
+
1
−
0
View file @
686ec0bb
...
@@ -5,6 +5,7 @@ API Reference
...
@@ -5,6 +5,7 @@ API Reference
:maxdepth: 1
:maxdepth: 1
scenarios.rst
scenarios.rst
enums.rst
kernelcreation.rst
kernelcreation.rst
methodcreation.rst
methodcreation.rst
stencils.rst
stencils.rst
...
...
This diff is collapsed.
Click to expand it.
doc/sphinx/enums.rst
0 → 100644
+
6
−
0
View file @
686ec0bb
*********
Enums
*********
.. automodule:: lbmpy.enums
:members:
This diff is collapsed.
Click to expand it.
lbmpy/creationfunctions.py
+
8
−
8
View file @
686ec0bb
...
@@ -15,11 +15,11 @@ General:
...
@@ -15,11 +15,11 @@ General:
This determines the selection and relaxation pattern of moments/cumulants, i.e. which moment/cumulant
This determines the selection and relaxation pattern of moments/cumulants, i.e. which moment/cumulant
basis is chosen, and which of the basis vectors are relaxed together
basis is chosen, and which of the basis vectors are relaxed together
- ``
srt
``: single relaxation time (:func:`lbmpy.methods.create_srt`)
- ``
Method.SRT
``: single relaxation time (:func:`lbmpy.methods.create_srt`)
- ``
trt
``: two relaxation time, first relaxation rate is for even moments and determines the viscosity (as in SRT),
- ``
Method.TRT
``: two relaxation time, first relaxation rate is for even moments and determines the viscosity (as in SRT),
the second relaxation rate is used for relaxing odd moments, and controls the bulk viscosity.
the second relaxation rate is used for relaxing odd moments, and controls the bulk viscosity.
(:func:`lbmpy.methods.create_trt`)
(:func:`lbmpy.methods.create_trt`)
- ``
mrt
``: orthogonal multi relaxation time model, relaxation rates are used in this order for :
- ``
Method.MRT
``: orthogonal multi relaxation time model, relaxation rates are used in this order for :
shear modes, bulk modes, 3rd order modes, 4th order modes, etc.
shear modes, bulk modes, 3rd order modes, 4th order modes, etc.
Requires also a parameter
'
weighted
'
that should be True if the moments should be orthogonal w.r.t. weighted
Requires also a parameter
'
weighted
'
that should be True if the moments should be orthogonal w.r.t. weighted
scalar product using the lattice weights. If `False` the normal scalar product is used.
scalar product using the lattice weights. If `False` the normal scalar product is used.
...
@@ -28,15 +28,15 @@ General:
...
@@ -28,15 +28,15 @@ General:
the same rate. Literature values of this list can be obtained through
the same rate. Literature values of this list can be obtained through
:func:`lbmpy.methods.creationfunctions.mrt_orthogonal_modes_literature`.
:func:`lbmpy.methods.creationfunctions.mrt_orthogonal_modes_literature`.
See also :func:`lbmpy.methods.create_mrt_orthogonal`
See also :func:`lbmpy.methods.create_mrt_orthogonal`
- ``
mrt_raw
``: non-orthogonal MRT where all relaxation rates can be specified independently i.e. there are as many
- ``
Method.MRT_RAW
``: non-orthogonal MRT where all relaxation rates can be specified independently i.e. there are as many
relaxation rates as stencil entries. Look at the generated method in Jupyter to see which moment<->relaxation rate
relaxation rates as stencil entries. Look at the generated method in Jupyter to see which moment<->relaxation rate
mapping (:func:`lbmpy.methods.create_mrt_raw`)
mapping (:func:`lbmpy.methods.create_mrt_raw`)
- ``
trt-kbc-n<N>
`` where <
N
> is 1,2,3 or 4. Special two-relaxation rate method. This is not the entropic method
- ``
Method.TRT_KBC_Nx
`` where <
x
> is 1,2,3 or 4. Special two-relaxation rate method. This is not the entropic method
yet, only the relaxation pattern. To get the entropic method, see parameters below!
yet, only the relaxation pattern. To get the entropic method, see parameters below!
(:func:`lbmpy.methods.create_trt_kbc`)
(:func:`lbmpy.methods.create_trt_kbc`)
- ``
cumulant
``: cumulant-based lb method (:func:`lbmpy.methods.create_with_default_polynomial_cumulants`) which
- ``
Method.CUMULANT
``: cumulant-based lb method (:func:`lbmpy.methods.create_with_default_polynomial_cumulants`) which
relaxes groups of polynomial cumulants chosen to optimize rotational invariance.
relaxes groups of polynomial cumulants chosen to optimize rotational invariance.
- ``
monomial_cumulant
``: cumulant-based lb method (:func:`lbmpy.methods.create_with_monomial_cumulants`) which
- ``
Method.MONOMIAL_CUMULANT
``: cumulant-based lb method (:func:`lbmpy.methods.create_with_monomial_cumulants`) which
relaxes monomial cumulants.
relaxes monomial cumulants.
- ``relaxation_rates``: sequence of relaxation rates, number depends on selected method. If you specify more rates than
- ``relaxation_rates``: sequence of relaxation rates, number depends on selected method. If you specify more rates than
...
@@ -184,7 +184,7 @@ execute this pipeline only up to a certain step. Each function optionally also t
...
@@ -184,7 +184,7 @@ execute this pipeline only up to a certain step. Each function optionally also t
Each of those functions is configured with three data classes. One to define the lattice Boltzmann method itself.
Each of those functions is configured with three data classes. One to define the lattice Boltzmann method itself.
This class is called `LBMConfig`. The second one determines optimisations which are specific to the LBM. Optimisations
This class is called `LBMConfig`. The second one determines optimisations which are specific to the LBM. Optimisations
like the common supexpression elimination. The config class is called `LBMOptimisation`. The third
like the common supexpression elimination. The config class is called `LBMOptimisation`. The third
data class determines hardware optimisation. This can be found in the pystencils module as
`
CreateKernelConfig
`
.
data class determines hardware optimisation. This can be found in the pystencils module as
'
CreateKernelConfig
'
.
With this class for example the target of the generated code is specified.
With this class for example the target of the generated code is specified.
For example, to modify the AST one can run::
For example, to modify the AST one can run::
...
...
This diff is collapsed.
Click to expand it.
lbmpy/enums.py
+
0
−
1
View file @
686ec0bb
...
@@ -25,7 +25,6 @@ class Method(Enum):
...
@@ -25,7 +25,6 @@ class Method(Enum):
MONOMIAL_CUMULANT
=
auto
()
MONOMIAL_CUMULANT
=
auto
()
# TODO integrate these
class
ForceModel
(
Enum
):
class
ForceModel
(
Enum
):
SIMPLE
=
auto
()
SIMPLE
=
auto
()
LUO
=
auto
()
LUO
=
auto
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment