[vtk-developers] A question regarding the most efficient way to merge neighbouring points in an iterative method

David Thompson david.thompson at kitware.com
Sun Mar 17 13:26:11 EDT 2013


Hi P,

The only other factor I can think of is the relationship between points in the order they are inserted. As you mention, merging points at the time of insertion can be slower than a merge pass later (I guess that this is because both the original algorithm and the point merging contend for the cache). However, if it is likely that points inserted one after another will be merged, that might be used to accelerate the search and reduce cache contention. You might even do both: try to merge the new point with just 1 or a few previously-inserted points. Then run a merge pass at the end to catch any points that were not merged upon creation. But that seems like a lot of work and code to maintain.

	D

> I have a question regarding the most efficient way to insert points in an iterative method creating those as the algorithm progresses.
> 
> Naively I am using a locator to insert each new point and possibly merge it on the fly if it is epsilon-close to a pre-existing one. This is convenient  and memory-wise this is efficient because the code does not grow a list of replicated points.
> 
> However, if we put memory aside and focus on speed, then it seems to be more effective to merge points in a single pass, once they have all been created. Especially as the complexity of the mesh increases. 
> 
> If anyone has looked into this issue I would appreciate any elements of discussion.




More information about the vtk-developers mailing list