MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / checkMatch

Function checkMatch

src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C:1177–1229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1175
1176
1177void Foam::faceCoupleInfo::checkMatch(const labelList& cutToMasterEdges) const
1178{
1179 const pointField& cutLocalPoints = cutFaces().localPoints();
1180
1181 const pointField& masterLocalPoints = masterPatch().localPoints();
1182 const faceList& masterLocalFaces = masterPatch().localFaces();
1183
1184 forAll(cutToMasterEdges, cutEdgeI)
1185 {
1186 const edge& e = cutFaces().edges()[cutEdgeI];
1187
1188 if (cutToMasterEdges[cutEdgeI] == -1)
1189 {
1190 // Internal edge. Check that master face is same on both sides.
1191 const labelList& cutEFaces = cutFaces().edgeFaces()[cutEdgeI];
1192
1193 label masterFacei = -1;
1194
1195 forAll(cutEFaces, i)
1196 {
1197 label cutFacei = cutEFaces[i];
1198
1199 if (cutToMasterFaces_[cutFacei] != -1)
1200 {
1201 if (masterFacei == -1)
1202 {
1203 masterFacei = cutToMasterFaces_[cutFacei];
1204 }
1205 else if (masterFacei != cutToMasterFaces_[cutFacei])
1206 {
1207 label myMaster = cutToMasterFaces_[cutFacei];
1208 const face& myF = masterLocalFaces[myMaster];
1209
1210 const face& nbrF = masterLocalFaces[masterFacei];
1211
1212 FatalErrorInFunction
1213 << "Internal CutEdge " << e
1214 << " coord:"
1215 << cutLocalPoints[e[0]]
1216 << cutLocalPoints[e[1]]
1217 << " connects to master " << myMaster
1218 << " and to master " << masterFacei << nl
1219 << "myMasterFace:"
1220 << myF.points(masterLocalPoints)
1221 << " nbrMasterFace:"
1222 << nbrF.points(masterLocalPoints)
1223 << abort(FatalError);
1224 }
1225 }
1226 }
1227 }
1228 }
1229}
1230
1231
1232Foam::label Foam::faceCoupleInfo::matchEdgeFaces

Callers 1

subDivisionMatchFunction · 0.85

Calls 5

localPointsMethod · 0.80
forAllFunction · 0.50
abortFunction · 0.50
edgesMethod · 0.45
pointsMethod · 0.45

Tested by

no test coverage detected