← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3885: fix the example script periodic-simple-shear.py

 

------------------------------------------------------------
revno: 3885
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
timestamp: Thu 2014-04-03 15:30:10 +0200
message:
  fix the example script periodic-simple-shear.py
modified:
  examples/test/periodic-simple-shear.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 'examples/test/periodic-simple-shear.py'
--- examples/test/periodic-simple-shear.py	2014-01-23 18:08:34 +0000
+++ examples/test/periodic-simple-shear.py	2014-04-03 13:30:10 +0000
@@ -29,29 +29,29 @@
 def triaxDone():
 	global phase
 	if phase==0:
-		print 'Here we are: stress',triax['stress'],'strain',triax['strain'],'stiffness',triax['stiff']
+		print 'Here we are: stress',triax.stress,'strain',triax.strain,'stiffness',triax.stiff
 		print 'Now shearing.'
-		O.cell.velGrad[1,2]=6.0
+		O.cell.velGrad=Matrix3(0,6,0, 0,0,0, 0,0,0)
 		triax.stressMask=7
-		triax['goal']=[-1e4,-1e4,-1e4]
+		triax.goal=[-1e4,-1e4,-1e4]
 		phase+=1
-	elif phase==1:
-		print 'Here we are: stress',triax['stress'],'strain',triax['strain'],'stiffness',triax['stiff']
-		#print 'Done, pausing now.'
-		#O.pause()
+		O.pause()
+	#elif phase==1:
+		#print 'Here we are: stress',triax.stress,'strain',triax.strain,'stiffness',triax.stiff
+		#phase+=1
+		##print 'Done, pausing now.'
+		##O.pause()
 		
 O.dt=PWaveTimeStep()
-O.run(7000);
-qt.View()
-#r=qt.Renderer()
-#r.bgColor=1,1,1
-O.wait()
-
-O.cell.velGrad[1,2]=0
-O.cell.velGrad[2,1]=-6
-O.run(5000);
-O.wait()
-
-O.cell.velGrad[1,2]=6
-O.cell.velGrad[2,1]=0
-O.run(5000);
+#O.run(7000);
+#qt.View()
+##r=qt.Renderer()
+##r.bgColor=1,1,1
+#O.wait()
+#O.saveTmp()
+#O.cell.velGrad=Matrix3(0,0,0, -6,0,0, 0,0,0)
+#O.run(5000);
+#O.wait()
+
+#O.cell.velGrad=Matrix3(0,6,0, 0,0,0, 0,0,0)
+#O.run(5000);