Civil Engineering Reference
In-Depth Information
i
k = V i j
Figure 2.27 Triangular elements around node k .
i
k = V i j
Figure 2.28 Tetrahedral elements around node k .
is the algorithm in finding all the elements connected to each node in a tetrahedral mesh.
As shown in Figures 2.27 and 2.28, the element i containing node k (i.e. kV i = for j = 1,2,3
for triangular elements and j = 1,2,3,4 for tetrahedral elements) will be recorded in array P.
Algorithm Element_Node_T3 (Np, Ne, V, P)
// Find the elements connected to each node in a triangular mesh
// Np and Ne are respectively the number of nodes and elements in the mesh.
// Input: V = Vertices of the elements
// Output: Elements connected to node k: {Pi, i , i = {Pi, k +1, P k+1 }
Set zero to array P: {P k = 0, k = 1,N p +1}
Loop: i = 1,Ne
Loop: j = 1,3
k=V j ; P k = P k +1
End loop j
End loop i
P 1 = P 1 + Np + 1
Loop: k = 1,Np
P k+1 = P k+1 + P k
End loop k
Loop: i = 1,Ne
Loop: j = 1,3
k=V j ; m = P k ; P m = i; P k = m - 1
End loop j
End loop i
Algorithm Element_Node_T4 (Np, Ne, V, P)
// Find the elements connected to each node in a tetrahedral mesh
// Np and Ne are respectively the number of nodes and elements in the
// mesh.
// Input: V = Vertices of the elements
Search WWH ::




Custom Search