Skip to content

Commit

Permalink
Merge pull request #2360 from RudolfWeeber/lb_test_stability
Browse files Browse the repository at this point in the history
Testsuite: Better averaging in lb test
  • Loading branch information
KaiSzuttor authored Nov 2, 2018
2 parents 6767007 + 10814d6 commit 97011f5
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit 97011f5

Please sign in to comment.