

triangle_12_node_incomplete (22): 12-node fourth order incomplete triangle (3 nodes associated with the vertices, 9 with the edges).triangle_10_node (21): 10-node third order triangle (3 nodes associated with the vertices, 6 with the edges, 1 with the face).triangle_9_node_incomplete (20): 9-node third order incomplete triangle (3 nodes associated with the vertices, 6 with the edges).pyramid_13_node (19): 13-node second order pyramid (5 nodes associated with the vertices and 8 with the edges).prism_15_node (18): 15-node second order prism (6 nodes associated with the vertices and 9 with the edges).hexahedron_20_node (17): 20-node second order hexahedron (8 nodes associated with the vertices and 12 with the edges).quadrangle_8_node (16): 8-node second order quadrangle (4 nodes associated with the vertices and 4 with the edges).pyramid_14_node (14): 14-node second order pyramid (5 nodes associated with the vertices, 8 with the edges and 1 with the quadrangular face).prism_18_node (13): 18-node second order prism (6 nodes associated with the vertices, 9 with the edges and 3 with the quadrangular faces).hexahedron_27_node (12): 27-node second order hexahedron (8 nodes associated with the vertices, 12 with the edges, 6 with the faces and 1 with the volume).tetrahedron_10_node (11): 10-node second order tetrahedron (4 nodes associated with the vertices and 6 with the edges).quadrangle_9_node (10): 9-node second order quadrangle (4 nodes associated with the vertices, 4 with the edges and 1 with the face).triangle_6_node (9): 6-node second order triangle (3 nodes associated with the vertices and 3 with the edges).line_3_node (8): 3-node second order line (2 nodes associated with the vertices and 1 with the edge).hexahedron_8_node (5): 8-node hexahedron.tetrahedron_4_node (4): 4-node tetrahedron.quadrangle_4_node (3): 4-node quadrangle.Available element types:Īs of gmsh 2.9.3 the integer element types are mapped as follows: Therefore, looping over the list will only make sense after Gt.add_elements_rule(is_hexahedron, print_brick_info)Īvoid pitfall!! The variable nodes_in_unit_box will only be filled when gt.parse() is called, andĪfter the corresponding rule is matched. Print "Node # ".format(eletag, nodes, nodes, nodes, nodes, nodes, nodes, nodes, nodes) Gt = gmshtranslator.gmshTranslator("filename.msh")ĭef node_in_unit_box(tag,x,y,z,physgroups): Nodal rule functions syntax:Ī nodal rule is composed of a condition and an action functions. Finally, the gt.parse() function is calledĪnd the file is parsed using the user defined rules. Then, the user implements rules for nodes and elements and informs gmshtranslator of these rules. Pre-allocation according to his or her needs. Once the file is initially read, the user can use the above information to do some initial memory Therefore, as opposed to elements, nodes can belong to more than one physical group. Of these nodes is that they connect to elements belonging to the given physical group. In gmsh only elements are associated with physical tags, so the meaning gt.nodes_in_physical_groups: (Python dictionary) Maps physical group number (tag, id) to nodesīelonging to that group.

gt.physical_groups: (Python list of integers) List of tags (integer identification numbers) of available physical groups defined in the file.

Will typically be larger than the actual number of elements that will be used in an actual model.

