← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3700: added forgotten example file

 

------------------------------------------------------------
revno: 3700
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Fri 2013-10-04 19:41:37 +0200
message:
  added forgotten example file
added:
  examples/test/unstructuredGrid.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
=== added file 'examples/test/unstructuredGrid.py'
--- examples/test/unstructuredGrid.py	1970-01-01 00:00:00 +0000
+++ examples/test/unstructuredGrid.py	2013-10-04 17:41:37 +0000
@@ -0,0 +1,38 @@
+################################################################################
+#
+# TODO
+#
+################################################################################
+
+O.engines = [
+	InsertionSortCollider([Bo1_Tetra_Aabb(),Bo1_Facet_Aabb()]),
+]
+
+ug = utils.UnstructuredGrid()
+v = {
+	1: (0,0,0),
+	3: (1,0,0),
+	5: (0,1,0),
+	6: (0,0,1),
+	2: (-1,0,0),
+}
+ct = {
+	1: (1,3,5),
+	4: (1,3,6),
+	8: (1,5,2,6),
+}
+ug.setup(v,ct,wire=False)
+ug.toSimulation()
+O.step()
+
+from yade import qt
+qt.View()
+
+def setNewCoords():
+	ug.setPositionsOfNodes({
+		1: (-1,-1,-1),
+		3: (2,0,.5),
+		5: (0,3,0),
+		6: (0,0,.5),
+		2: (-1,0,1)
+	})