for each tetrahedron do |
for each triangle of the current tetrahedron do |
vIDs[3] = three vertex IDs of the current Tri. |
sort vIDs |
hash_key = vIDs[0] mod |hash_table| |
List = hash_table[hash_key] |
if ( Find the same vIDs in List ) then |
Create a cell connectivity information |
else |
List ← Push current triangle |
endif |
end for |
end for |