From 10814d66f8517f84c624354a1465295dffa15387 Mon Sep 17 00:00:00 2001 From: Rudolf Weeber Date: Fri, 2 Nov 2018 10:55:36 +0100 Subject: [PATCH] Testsuite: Better averaging in lb test --- testsuite/python/lb.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/testsuite/python/lb.py b/testsuite/python/lb.py index 20e9f8245d3..f9e62d31235 100644 --- a/testsuite/python/lb.py +++ b/testsuite/python/lb.py @@ -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, @@ -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) @@ -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):