Commit a416915f authored by Martin Bauer's avatar Martin Bauer
Browse files

Fixes for new simplifications

parent 9b169d14
......@@ -109,7 +109,8 @@ class CumulantBasedLbMethod(AbstractLbMethod):
return sp.Matrix([eq.rhs for eq in equilibrium.main_assignments])
def get_collision_rule(self, conserved_quantity_equations=None, moment_subexpressions=False,
pre_collision_subexpressions=True, post_collision_subexpressions=False):
pre_collision_subexpressions=True, post_collision_subexpressions=False,
keep_rrs_symbolic=None):
return self._get_collision_rule_with_relaxation_matrix(sp.diag(*self.relaxation_rates),
conserved_quantity_equations,
moment_subexpressions, pre_collision_subexpressions,
......
......@@ -77,7 +77,7 @@ class EntropicEquilibriumSRT(AbstractLbMethod):
cr.simplification_hints['relaxation_rates'] = []
return cr
def get_collision_rule(self, conserved_quantity_equations=None):
def get_collision_rule(self, conserved_quantity_equations=None, keep_rrs_symbolic=None):
return self._get_collision_rule_with_relaxation_rate(self._relaxationRate,
conserved_quantity_equations=conserved_quantity_equations)
......
......@@ -14,7 +14,7 @@ from lbmpy.stencils import get_stencil
def check_method(method, limits_default, limits_cse):
strategy = create_simplification_strategy(method)
strategy_with_cse = create_simplification_strategy(method)
strategy_with_cse = cse_in_opposing_directions(strategy_with_cse)
strategy_with_cse.add(cse_in_opposing_directions)
collision_rule = method.get_collision_rule()
ops_default = strategy(collision_rule).operation_count
......@@ -64,4 +64,4 @@ def test_simplifications_trt_d3q19_force_compressible():
o1, o2 = sp.symbols("omega_1 omega_2")
force_model = Guo([sp.Rational(1, 3), sp.Rational(1, 2), sp.Rational(1, 5)])
method = create_trt_with_magic_number(get_stencil("D3Q19"), o1, compressible=False, force_model=force_model)
check_method(method, [269, 282, 1], [242, 176, 1])
check_method(method, [270, 283, 1], [243, 177, 1])
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