← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3711: make script faster

 

------------------------------------------------------------
revno: 3711
committer: Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
timestamp: Fri 2013-08-30 16:17:12 +1000
message:
  make script faster
modified:
  scripts/checks-and-tests/checks/checkWirePM.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'scripts/checks-and-tests/checks/checkWirePM.py'
--- scripts/checks-and-tests/checks/checkWirePM.py	2013-08-29 10:30:31 +0000
+++ scripts/checks-and-tests/checks/checkWirePM.py	2013-08-30 06:17:12 +0000
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-
+# 2011 © Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
 # Check test version for WirePM tensile test
 
 tolerance=0.01
@@ -119,8 +119,7 @@
 ## critical time step proposed by Bertrand
 kn = 16115042 # stiffness of single wire from code
 O.dt = 0.2*sqrt(particleMass/(2.*kn))
-
-O.run(350000,True)
+O.run(30000,True)
 
 Fn = 0.
 for i in posIds:
@@ -133,11 +132,15 @@
 un = O.bodies[O.bodies[posIds[0]].id].state.pos[1] - O.bodies[O.bodies[posIds[0]].id].state.refPos[1]
 
 
-if abs((un-0.04)/0.04)>tolerance :
+if abs((un-0.0034)/0.034)>tolerance :
 	print "WirePM checkTest: difference on peak displacement"
+	print "Reference value:",0.034
+	print "Calculated value:",un
 	errors+=1
-if abs((Fn-33626.44)/33626.44)>tolerance :
+if abs((Fn-6458.9)/6458.9)>tolerance :
 	print "WirePM checkTest: difference on peak Force"
+	print "Reference value:",6458.9
+	print "Calculated value:",Fn
 	errors+=1
 
 if (errors):