Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testsuite: Better averaging in lb test #2360

Merged
merged 1 commit into from
Nov 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions testsuite/python/lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class TestLB(object):
n_nodes = system.cell_system.get_state()["n_nodes"]
system.seed = range(n_nodes)
np.random.seed = 1
params = {'int_steps': 25,
'int_times': 10,
params = {'int_steps': 15,
'int_times': 30,
'time_step': 0.01,
'tau': 0.01,
'agrid': 0.5,
Expand Down Expand Up @@ -121,8 +121,9 @@ def test_mass_momentum_thermostat(self):

# Go over lb lattice
for lb_node in lb_nodes:
fluid_mass += lb_node.density[0]
fluid_temp += np.sum(lb_node.velocity**2) * lb_node.density[0]
dens = lb_node.density[0]
fluid_mass += dens
fluid_temp += np.sum(lb_node.velocity**2) * dens

# Normalize
fluid_mass /= len(lb_nodes)
Expand Down Expand Up @@ -250,7 +251,7 @@ def setUp(self):
@ut.skipIf(
not espressomd.has_features(
["LB_GPU"]) or espressomd.has_features('SHANCHEN'),
"Features not available, skipping test!")
"Features not available, skipping test!")
class TestLBGPU(TestLB, ut.TestCase):

def setUp(self):
Expand Down