Commit d2ddcd76 authored by Markus Holzer's avatar Markus Holzer
Browse files

Changed order in creatfunctions for entropic LBM to work

parent 6b04bc1b
......@@ -322,20 +322,6 @@ def create_lb_collision_rule(lb_method=None, optimization={}, **kwargs):
else:
collision_rule = lb_method.get_collision_rule(keep_rrs_symbolic=keep_rrs_symbolic)
if params['output'] and params['kernel_type'] == 'stream_pull_collide':
cqc = lb_method.conserved_quantity_computation
output_eqs = cqc.output_equations_from_pdfs(lb_method.pre_collision_pdf_symbols, params['output'])
collision_rule = collision_rule.new_merged(output_eqs)
if opt_params['simplification'] == 'auto':
simplification = create_simplification_strategy(lb_method, split_inner_loop=split_inner_loop)
else:
simplification = opt_params['simplification']
collision_rule = simplification(collision_rule)
if params['fluctuating']:
add_fluctuations_to_collision_rule(collision_rule, **params['fluctuating'])
if params['entropic']:
if params['smagorinsky']:
raise ValueError("Choose either entropic or smagorinsky")
......@@ -355,6 +341,20 @@ def create_lb_collision_rule(lb_method=None, optimization={}, **kwargs):
if 'split_groups' in collision_rule.simplification_hints:
collision_rule.simplification_hints['split_groups'][0].append(sp.Symbol("smagorinsky_omega"))
if params['output'] and params['kernel_type'] == 'stream_pull_collide':
cqc = lb_method.conserved_quantity_computation
output_eqs = cqc.output_equations_from_pdfs(lb_method.pre_collision_pdf_symbols, params['output'])
collision_rule = collision_rule.new_merged(output_eqs)
if opt_params['simplification'] == 'auto':
simplification = create_simplification_strategy(lb_method, split_inner_loop=split_inner_loop)
else:
simplification = opt_params['simplification']
collision_rule = simplification(collision_rule)
if params['fluctuating']:
add_fluctuations_to_collision_rule(collision_rule, **params['fluctuating'])
cse_pdfs = False if 'cse_pdfs' not in opt_params else opt_params['cse_pdfs']
cse_global = False if 'cse_global' not in opt_params else opt_params['cse_global']
if cse_pdfs:
......
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