MATLAB: Is it possible to find connectivity of part of a FE mesh with only nodal information

connectivityfinite elementmeshnodes

Hi all, Imagine there is a FE mesh with 2 inclusions:
I know the coordinates and element connectivity of the whole mesh, I also know the coordinates and node number of 2 inclusions. Now I'd like to find the connectivity of these 2 inclusions. Is it possible?
Please see attached .mat file for the known information.
Many thanks!

Best Answer

I solved it.
Create an zero array where the indices represent the nodal numbers, set the nodal numbers of inclusions to 1.
Loop over all elements, if all nodes of an element has a 1 in the array, add this element to the connectivity list.
Related Question