I want to split one triangular mesh into two parts based on the material information which is already included in the mesh.
The data is looking like this and it should be split into two parts the blue one and the other one.
I am using this example.
But every time I am getting a wrong output. I am not understanding what caused this problem. Could you please help me.
I am attaching my input file here my source code and input file.