I'm writing a code in C++ to parse abaqus/calculix input file for 2D plane stress problems. I'm not a user of abaqus/calculix but I noticed that the input file doesn't ask complete boundary details. If there is a loading/displacement boundary condition then we need to specify the corresponding boundary element otherwise no need to specify boundary element/nodes. How can we recognize boundary elements and edges from a mere element node connectivity data?
1 Answer
You need to build a set of faces and see how many neighbors each has. You build the set of faces by looping over the cells. Each triangular cell has 3 faces and so you have to look up if the face already exists and add it to the list of faces if it doesn't. After that, you know that the face exists in the set and you add the current cell as one of possibly two neighbors of the face. At the end, you go through all faces and those that have only one neighbor will be at the boundary.
Similarly, the nodes that belong to boundary faces are at the boundary.