← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2712: 1. Fix plots with line specifiers

 

------------------------------------------------------------
revno: 2712
committer: Václav Šmilauer <eu@xxxxxxxx>
branch nick: yade
timestamp: Mon 2011-02-07 13:42:43 +0100
message:
  1. Fix plots with line specifiers
  2. Fix peri-triax example (sweepDist->verletDist)
modified:
  doc/sphinx/tutorial/peri-triax.py
  py/plot.py


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'doc/sphinx/tutorial/peri-triax.py'
--- doc/sphinx/tutorial/peri-triax.py	2011-01-20 16:35:46 +0000
+++ doc/sphinx/tutorial/peri-triax.py	2011-02-07 12:42:43 +0000
@@ -5,7 +5,7 @@
 sp.toSimulation()
 O.engines=[
 	ForceResetter(),
-	InsertionSortCollider([Bo1_Sphere_Aabb()],sweepLength=.05*rMean),
+	InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*rMean),
 	InteractionLoop([Ig2_Sphere_Sphere_L3Geom()],[Ip2_FrictMat_FrictMat_FrictPhys()],[Law2_L3Geom_FrictPhys_ElPerfPl()]),
 	NewtonIntegrator(damping=.6),
 	PeriTriaxController(goal=(-1e6,-1e6,-.1),stressMask=0b011,maxUnbalanced=.2,doneHook='goalReached()',label='triax',maxStrainRate=(.1,.1,.1),dynCell=True),
@@ -21,7 +21,7 @@
 		i=O.iter,unbalanced=utils.unbalancedForce(),
 		totalEnergy=O.energy.total(),**O.energy       # plot all energies
 	)
-plot.plots={'i':('unbalanced',None,'kinetic'),' i':('ex','ey','ez',None,'sx','sy','sz'),'i ':(O.energy.keys,None,('totalEnergy','bo'))}
+plot.plots={'i':(('unbalanced','go'),None,'kinetic'),' i':('ex','ey','ez',None,'sx','sy','sz'),'i ':(O.energy.keys,None,('totalEnergy','bo'))}
 plot.plot()
 O.saveTmp()
 O.run()

=== modified file 'py/plot.py'
--- py/plot.py	2011-02-07 09:00:07 +0000
+++ py/plot.py	2011-02-07 12:42:43 +0000
@@ -284,7 +284,7 @@
 	"""Add point type specifier to simple variable name; optionally take only the part before '=' from the first item."""
 	if type(o) in [tuple,list]:
 		if noSplit or not type(o[0])==str: return o
-		else: return list(o[0].split('=',1)[0],o[1:])
+		else: return (o[0].split('=',1)[0],)+tuple(o[1:])
 	else: return (o if (noSplit or not type(o)==str) else (o.split('=',1)[0]),'')
 def tuplifyYAxis(pp):
 	"""convert one variable to a 1-tuple"""