g.structuredVolume([0,1,2,3,4,5], 0, marker=90) # ---- Create mesh ---------------------------------------------------------- # Element type 5 is hexahedron. (See user manual for more element types) el_type = 5 # Degrees of freedom per node. dofs_per_node = 1 # Create mesh coords, edof, dofs, bdofs, _ = cfm.mesh(g, el_type, dofs_per_node) #coords, edof, dofs, bdofs, _ = cfm.mesh( # g, el_type, dofs_per_node, gmsh_exec_path="D:\\vsmn20-software\\gmsh\gmsh.exe") # ---- Visualise mesh ------------------------------------------------------- # Hold Left Mouse button to rotate. # Hold right mouse button to zoom. # Hold SHIFT and left mouse button to pan. # Hold SHIFT and right mouse button to change the field of view. # Hold Ctrl and left mouse button to roll the camera. # Draw geometry cfv.draw_geometry(g, draw_points=False)
g.volume([0, 1, 2, 3]) # ---- Create mesh ---------------------------------------------------------- # Element type 4 is tetrahedron. (See user manual for more element types). el_type = 4 # Degrees of freedom per node. dofs_per_node = 1 # Create mesh coords, edof, dofs, bdofs, elementmarkers = cfm.mesh(g, el_type, 0.3, dofs_per_node) #coords, edof, dofs, bdofs, _ = cfm.mesh( # g, el_type, 0.3, dofs_per_node, gmsh_exec_path="D:\\vsmn20-software\\gmsh\gmsh.exe") # ---- Visualise mesh ------------------------------------------------------- # Create two axes that are viewed from the same camera: cfv.figure() a1 = cfv.subplot(121) a2 = cfv.subplot(122) cam = cfv.camera3d() a1.camera = a2.camera = cam # Draw geometry and mesh
g.volume([0, 1, 2, 3]) # ---- Create mesh ---------------------------------------------------------- # Element type 4 is tetrahedron. (See user manual for more element types). elType = 4 # Degrees of freedom per node. dofsPerNode = 1 # Create mesh coords, edof, dofs, bdofs, elementmarkers = cfm.mesh(g, elType, 0.3, dofsPerNode) # ---- Visualise mesh ------------------------------------------------------- # Create two axes that are viewed from the same camera: cfv.figure() a1 = cfv.subplot(121) a2 = cfv.subplot(122) cam = cfv.camera3d() a1.camera = a2.camera = cam # Draw geometry and mesh cfv.drawGeometry(g, axes=a1) cfv.drawMesh(coords=coords,
g.structuredVolume([0, 1, 2, 3, 4, 5], 0, marker=90) # ---- Create mesh ---------------------------------------------------------- # Element type 5 is hexahedron. (See user manual for more element types) elType = 5 # Degrees of freedom per node. dofsPerNode = 1 # Create mesh coords, edof, dofs, bdofs, _ = cfm.mesh(g, elType, dofsPerNode) # ---- Visualise mesh ------------------------------------------------------- # Hold Left Mouse button to rotate. # Hold right mouse button to zoom. # Hold SHIFT and left mouse button to pan. # Hold SHIFT and right mouse button to change the field of view. # Hold Ctrl and left mouse button to roll the camera. # Draw geometry cfv.drawGeometry(g, drawPoints=False) # Draw mesh