Suppose I have a mesh consisting of a set $M$ of conformal elements that fill the region $R=[0,1]\times[0,1]$. Suppose that I also have a 2D shape $S\subset R$ whose boundary $\partial S$ is piecewise linear, but which is not necessarily convex nor necessarily simply connected. Without making any assumptions on the particular shape of the elements in the mesh, how can I efficiently determine the smallest set of elements whose union contains all of the shape $S$?
Though my question is posed in 2D, I'm interested in an approach that would extend to 3D as well.