Fast access to mesh vertices

Hi everyone,

I need access to element numbers of elements which contain at leat one of a small given set of vertices. At the moment I have a BitArray for the relevant vertices, I them loop over all vertices, and mark the elements of the vertices marked as True in another BitArray. I find this relatively inefficient, since most vertices are marked False.

If I have a list containing the vertex numbers (i.e. locations where the BitArray is True), is there anyway to directly access the relevant vertex from its number, so that I do not need to loop over all vertices?

Best wishes,