Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Fast access to mesh vertices

More
4 years 7 months ago #1914 by hvwahl
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,
Henry
Time to create page: 0.130 seconds