I'm trying to optimize structures by using FEM and genetic algorithms (GA). The FEM solver is a commercial one, and I'm programming the GA. Eventually I hope to get something like this.
My first approach is simple, just erasing elements and computing the result, but I'm getting a lot of unfeasible solutions because some parts of the mesh become disconnected.
How can I detect unconnected structures in my 2D mesh?
If you want to code a tool to do it for you, its simple. but you should access the raw information of your mesh also a little knowledge about graph theory and programming. You can start breadth first or depth first search (witch have a very simple mechanism) with any random starting node, then mark every node you are visiting. after search done, if any node is not visited then you're graph is disconnected and also you can enumerate the disconnected parts of your graph by recursively check the new separated part from last step...