1 # -*- coding: iso-8859-1 -*-
4 from hoomd_script
import *
8 # tests for update.zero_momentum
9 class update_zero_momentum_tests (unittest
.TestCase
):
12 init
.create_random(N
=100, phi_p
=0.05);
14 sorter
.set_params(grid
=8)
16 # tests basic creation of the updater
18 update
.zero_momentum()
21 # test variable periods
22 def test_variable(self
):
23 update
.zero_momentum(period
= lambda n
: n
*100);
29 if __name__
== '__main__':
30 unittest
.main(argv
= ['test.py', '-v'])