Dear CS10-Gitlab-users, on Thursday, Feb 3 there will be maintenance. That will lead to a downtime of the CS10-Gitlab-service including Subversion and Mattermost chat from 09:30. This might take the whole day since we don't know how long it is going to take. We are sorry for the inconvenience! Best regards, CS10-Admin-Team

Commit 7fb0d512 authored by Helen Schottenhamml's avatar Helen Schottenhamml
Browse files

Merge branch 'Fix_pystencils_version' into 'master'

Fix: Fluctuating LBM

See merge request !489
parents b123bc98 70bac688
Pipeline #35247 failed with stages
in 230 minutes and 42 seconds
......@@ -13,6 +13,9 @@ with CodeGeneration() as ctx:
force_field, vel_field = ps.fields("force(3), velocity(3): [3D]", layout='fzyx')
def rr_getter(moment_group):
"""Maps a group of moments to a relaxation rate (shear, bulk, even, odd)
in the 4 relaxation time thermalized LB model
is_shear = [is_shear_moment(m, 3) for m in moment_group]
is_bulk = [is_bulk_moment(m, 3) for m in moment_group]
order = [get_order(m) for m in moment_group]
......@@ -20,24 +23,24 @@ with CodeGeneration() as ctx:
order = order[0]
if order < 2:
return 0.0
return [0] * len(moment_group)
elif any(is_bulk):
assert all(is_bulk)
return sp.Symbol("omega_bulk")
return [sp.Symbol("omega_bulk")] * len(moment_group)
elif any(is_shear):
assert all(is_shear)
return sp.Symbol("omega_shear")
return [sp.Symbol("omega_shear")] * len(moment_group)
elif order % 2 == 0:
assert order > 2
return sp.Symbol("omega_even")
return [sp.Symbol("omega_even")] * len(moment_group)
return sp.Symbol("omega_odd")
return [sp.Symbol("omega_odd")] * len(moment_group)
method = create_mrt_orthogonal(
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