Skip to content

Spanningtree

Nicolas Marsic requested to merge spanningtree into master

I wrote a small plugin for extracting a spanning tree from the mesh. It works by specifying a physical group, on which the tree will be built. Optionally, another physical group can be given, on which the tree will be first built. The plugin uses Kruskal's algorithm and is implemented with Disjoint Set Union.

It looks like everything works fine :). Valgrind shows no memory problems, apart from one tiny thing: the PluginManager is not deleted... I tried to add a delete PluginManager::instance(); in Msg::exit(int). This hack is not in this merge request: should we make this permanent?

I also tested the tree as a tree/cotree gauge in different 2D cases, and with the Microcoil model in GetDP. Again, everything went fine :) ... and ran faster than EdgesOfTreeIn ;).

Merge request reports