Skip to content
Snippets Groups Projects
Commit 686ec0bb authored by Markus Holzer's avatar Markus Holzer
Browse files

Fixed doc

parent ddea6da8
No related branches found
No related tags found
1 merge request!93Dataclasses for method creation
Pipeline #34328 failed
...@@ -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
......
*********
Enums
*********
.. automodule:: lbmpy.enums
:members:
...@@ -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::
......
...@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment