Commit 8c80738a authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Added forcing subexpressions to entropic method

parent d352fee8
Pipeline #33899 failed with stages
in 12 minutes and 23 seconds
...@@ -3,7 +3,7 @@ import sympy as sp ...@@ -3,7 +3,7 @@ import sympy as sp
from lbmpy.maxwellian_equilibrium import get_weights from lbmpy.maxwellian_equilibrium import get_weights
from lbmpy.methods.abstractlbmethod import AbstractLbMethod, LbmCollisionRule from lbmpy.methods.abstractlbmethod import AbstractLbMethod, LbmCollisionRule
from lbmpy.methods.conservedquantitycomputation import DensityVelocityComputation from lbmpy.methods.conservedquantitycomputation import DensityVelocityComputation
from pystencils import Assignment from pystencils import Assignment, AssignmentCollection
class EntropicEquilibriumSRT(AbstractLbMethod): class EntropicEquilibriumSRT(AbstractLbMethod):
...@@ -55,9 +55,13 @@ class EntropicEquilibriumSRT(AbstractLbMethod): ...@@ -55,9 +55,13 @@ class EntropicEquilibriumSRT(AbstractLbMethod):
rho = self._cqc.zeroth_order_moment_symbol rho = self._cqc.zeroth_order_moment_symbol
u = self._cqc.first_order_moment_symbols u = self._cqc.first_order_moment_symbols
all_subexpressions = []
if self._forceModel is not None:
all_subexpressions += AssignmentCollection(self._forceModel.subs_dict_force).all_assignments
if conserved_quantity_equations is None: if conserved_quantity_equations is None:
conserved_quantity_equations = self._cqc.equilibrium_input_equations_from_pdfs(f) conserved_quantity_equations = self._cqc.equilibrium_input_equations_from_pdfs(f)
all_subexpressions = conserved_quantity_equations.all_assignments all_subexpressions += conserved_quantity_equations.all_assignments
eq = [] eq = []
for w_i, direction in zip(self.weights, self.stencil): for w_i, direction in zip(self.weights, self.stencil):
......
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