4 salome.salome_init_without_session()
6 from salome.smesh import smeshBuilder
8 smesh_builder = smeshBuilder.New()
10 # create an empty mesh structure
11 mesh = smesh_builder.Mesh()
13 # build five quadrangles:
17 n1 = mesh.AddNode(0.0 * dx, 0, 0)
18 n2 = mesh.AddNode(1.0 * dx, 0, 0)
19 n3 = mesh.AddNode(2.0 * dx, 0, 0)
20 n4 = mesh.AddNode(3.0 * dx, 0, 0)
21 n5 = mesh.AddNode(4.0 * dx, 0, 0)
22 n6 = mesh.AddNode(5.0 * dx, 0, 0)
23 n7 = mesh.AddNode(0.0 * dx, dy, 0)
24 n8 = mesh.AddNode(1.0 * dx, dy, 0)
25 n9 = mesh.AddNode(2.0 * dx, dy, 0)
26 n10 = mesh.AddNode(3.0 * dx, dy, 0)
27 n11 = mesh.AddNode(4.0 * dx, dy, 0)
28 n12 = mesh.AddNode(5.0 * dx, dy, 0)
30 f1 = mesh.AddFace([n1, n2, n8 , n7 ])
31 f2 = mesh.AddFace([n2, n3, n9 , n8 ])
32 f3 = mesh.AddFace([n3, n4, n10, n9 ])
33 f4 = mesh.AddFace([n4, n5, n11, n10])
34 f5 = mesh.AddFace([n5, n6, n12, n11])
36 # Change the orientation of the second and the fourth faces.