~ubuntu-branches/ubuntu/trusty/yade/trusty

« back to all changes in this revision

Viewing changes to examples/test/unstructuredGrid.py

  • Committer: Package Import Robot
  • Author(s): Anton Gladky, cf3f8d9
  • Date: 2013-10-30 20:56:33 UTC
  • mfrom: (20.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20131030205633-1f01r7hjce17d723
Tags: 1.05.0-2
[cf3f8d9] Pass -ftrack-macro-expansion=0 only if gcc>=4.8. (Closes: #726009)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
################################################################################
 
2
#
 
3
# TODO
 
4
#
 
5
################################################################################
 
6
 
 
7
O.engines = [
 
8
        InsertionSortCollider([Bo1_Tetra_Aabb(),Bo1_Facet_Aabb()]),
 
9
]
 
10
 
 
11
ug = utils.UnstructuredGrid()
 
12
v = {
 
13
        1: (0,0,0),
 
14
        3: (1,0,0),
 
15
        5: (0,1,0),
 
16
        6: (0,0,1),
 
17
        2: (-1,0,0),
 
18
}
 
19
ct = {
 
20
        1: (1,3,5),
 
21
        4: (1,3,6),
 
22
        8: (1,5,2,6),
 
23
}
 
24
ug.setup(v,ct,wire=False)
 
25
ug.toSimulation()
 
26
O.step()
 
27
 
 
28
from yade import qt
 
29
qt.View()
 
30
 
 
31
def setNewCoords():
 
32
        ug.setPositionsOfNodes({
 
33
                1: (-1,-1,-1),
 
34
                3: (2,0,.5),
 
35
                5: (0,3,0),
 
36
                6: (0,0,.5),
 
37
                2: (-1,0,1)
 
38
        })