From 0f5d637240e9f1002401794fafd2eb196f47ddc6 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 4 Aug 2023 15:41:28 +0200 Subject: [PATCH] Add more comments --- Interface.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Interface.C b/Interface.C index 14285b8e..abca451f 100644 --- a/Interface.C +++ b/Interface.C @@ -296,15 +296,19 @@ void preciceAdapter::Interface::configureMesh(const fvMesh& mesh, const std::str std::vector triVertIDs; triVertIDs.reserve(faceField.size() * triaPerQuad * nodesPerTria); - // Iterate over faces + // Triangulate all faces and collect set of nodes that form triangles, + // which are used to set mesh triangles in preCICE. forAll(faceField, facei) { const face& faceQuad = faceField[facei]; + // Triangulate the face faceTriangulation faceTri(pointCoords, faceQuad, false); + // Iterate over all triangles generated out of each (quad) face for (uint triIndex = 0; triIndex < triaPerQuad; triIndex++) { + // Get the vertex that corresponds to the x,y,z coordinates of each node of a triangle for (uint nodeIndex = 0; nodeIndex < nodesPerTria; nodeIndex++) { triVertIDs.push_back(verticesMap.at(std::make_tuple(pointCoords[faceTri[triIndex][nodeIndex]][0], pointCoords[faceTri[triIndex][nodeIndex]][1], pointCoords[faceTri[triIndex][nodeIndex]][2])));