## 从列表和顺序i中提取数据

2021-10-17 14:57:28 发布

I have a finite element mesh made of two noded finite elements (so each finite element (line) is made of two nodes located in its extremeties). I have several types of components (groups of finite elements) in the mesh. So for example a vertical component is made up of several finite elements aligned vertically from bottom to top, and adjacent finite elements share a common node.

I need to get a list of lists where each list has the node IDs (node numbers) of each vertical component, ordered from bottom to top.

``````nodes = [[node_ID1, X1, Y1, Z1],[node_ID2, X2, Y2, Z2], ...]]
elements = [[element_ID1, nodeID_a, nodeID_b],[element_ID2, nodeID_b, nodeID_c], ...]]
``````

``````nodesV = [[node_IDa, node_IDb, node_IDc],[ ....]]
elementsV = [[element_IDa, element_IDb, element_IDc],[ ....]]
``````

``````desired_list = [[first nodeID of vertical component 1, ...., last nodeID],[first nodeID of vertical component 2, ...., last nodeID], ...]]
``````

``````nodes = [[1, 0, 0, 0], [2, 1, 0, 0], [3, 1, 0, 1]]
elements = [[1, 1, 2], [2, 1, 3]]

nodesV = [[1,3]] #each list can only contain 16 elements
elementsV = []
``````

0条回答