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?