Commit 12cfcaf8 authored by Markus Holzer's avatar Markus Holzer
Browse files

Minor changes

parent 482f60c6
Pipeline #33568 passed with stages
in 33 minutes and 30 seconds
......@@ -42,7 +42,7 @@ class AbstractMomentTransform:
Transformations from the population space to any space of observable quantities may *absorb* the equations
defining the macroscopic quantities entering the equilibrium (typically the density :math:`\rho` and the
velocity :math:`\vec{u}`). This means that the :func:`forward_transform` will possibly rewrite the
velocity :math:`\mathbf{u}`). This means that the :func:`forward_transform` will possibly rewrite the
assignments given in the constructor argument ``conserved_quantity_equations`` to reduce
the total operation count. For example, in the transformation step from populations to
raw moments (see `PdfsToMomentsByChimeraTransform`), :math:`\rho` can be aliased as the zeroth-order moment
......
......@@ -62,7 +62,7 @@ class PdfsToMomentsByMatrixTransform(AbstractMomentTransform):
moments, expressed in terms of the pre-collision populations by matrix-multiplication.
The moment transformation matrix :math:`M` provided by :func:`lbmpy.moments.moment_matrix` is
used to compute the pre-collision moments as :math:`\vec{m}_{pre} = M \cdot \vec{f}_{pre}`,
used to compute the pre-collision moments as :math:`\mathbf{m}_{pre} = M \cdot \mathbf{f}_{pre}`,
which is returned element-wise.
Args:
......@@ -89,19 +89,20 @@ class PdfsToMomentsByMatrixTransform(AbstractMomentTransform):
The moment transformation matrix :math:`M` provided by :func:`lbmpy.moments.moment_matrix` is
inverted and used to compute the pre-collision moments as
:math:`\vec{f}_{post} = M^{-1} \cdot \vec{m}_{post}`, which is returned element-wise.
:math:`\mathbf{f}_{\mathrm{post}} = M^{-1} \cdot \mathbf{m}_{\mathrm{post}}`, which is returned element-wise.
**Simplifications**
If simplification is enabled, the equations for populations :math:`f_i` and :math:`f_{\bar{i}}`
of opposite stencil directions :math:`\vec{c}_i` and :math:`\vec{c}_{\bar{i}} = - \vec{c}_i`
are split into their symmetric and antisymmetric parts :math:`f_i^{sym}, f_i^{anti}`, such that
of opposite stencil directions :math:`\mathbf{c}_i` and :math:`\mathbf{c}_{\bar{i}} = - \mathbf{c}_i`
are split into their symmetric and antisymmetric parts :math:`f_i^{\mathrm{sym}}, f_i^{\mathrm{anti}}`, such
that
.. math::
f_i = f_i^{sym} + f_i^{anti}
f_i = f_i^{\mathrm{sym}} + f_i^{\mathrm{anti}}
f_{\bar{i}} = f_i^{sym} - f_i^{anti}
f_{\bar{i}} = f_i^{\mathrm{sym}} - f_i^{\mathrm{anti}}
Args:
......@@ -262,6 +263,7 @@ class PdfsToMomentsByChimeraTransform(AbstractMomentTransform):
pdf_symbols: List of symbols that represent the pre-collision populations
simplification: Simplification specification. See :class:`AbstractMomentTransform`
subexpression_base: The base name used for any subexpressions of the transformation.
return_raw_moments: If True raw moment equations are returned as main assignments
"""
simplification = self._get_simp_strategy(simplification, 'forward')
......@@ -327,28 +329,30 @@ class PdfsToMomentsByChimeraTransform(AbstractMomentTransform):
r"""Returns an assignment collection containing equations for post-collision populations,
expressed in terms of the post-collision polynomial moments by matrix-multiplication.
The post-collision raw moments :math:`\vec{m}_{post}` are first obtained from the polynomials.
The post-collision raw moments :math:`\mathbf{m}_{\mathrm{post}}` are first obtained from the polynomials.
Then, the raw moment transformation matrix :math:`M_r` provided by :func:`lbmpy.moments.moment_matrix`
is inverted and used to compute the pre-collision moments as
:math:`\vec{f}_{post} = M_r^{-1} \cdot \vec{m}_{post}`.
:math:`\mathbf{f}_{\mathrm{post}} = M_r^{-1} \cdot \mathbf{m}_{\mathrm{post}}`.
**Simplifications**
If simplification is enabled, the equations for populations :math:`f_i` and :math:`f_{\bar{i}}`
of opposite stencil directions :math:`\vec{c}_i` and :math:`\vec{c}_{\bar{i}} = - \vec{c}_i`
are split into their symmetric and antisymmetric parts :math:`f_i^{sym}, f_i^{anti}`, such that
of opposite stencil directions :math:`\mathbf{c}_i` and :math:`\mathbf{c}_{\bar{i}} = - \mathbf{c}_i`
are split into their symmetric and antisymmetric parts :math:`f_i^{\mathrm{sym}}, f_i^{\mathrm{anti}}`, such
that
.. math::
f_i = f_i^{sym} + f_i^{anti}
f_i = f_i^{\mathrm{sym}} + f_i^{\mathrm{anti}}
f_{\bar{i}} = f_i^{sym} - f_i^{anti}
f_{\bar{i}} = f_i^{\mathrm{sym}} - f_i^{\mathrm{anti}}
Args:
pdf_symbols: List of symbols that represent the post-collision populations
simplification: Simplification specification. See :class:`AbstractMomentTransform`
subexpression_base: The base name used for any subexpressions of the transformation.
start_from_raw_moments: If set to True the equations are not converted to monomials
"""
simplification = self._get_simp_strategy(simplification, 'backward')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment