37 void Foam::attachDetach::detachInterface
66 Pout<<
"void attachDetach::detachInterface("
67 <<
"polyTopoChange& ref) const "
68 <<
" for object " <<
name() <<
" : "
69 <<
"Detaching interface" <<
endl;
81 if (faceLabels.size() > 0)
83 for (label i = 1; i < faceLabels.size(); i++)
85 if (faceLabels[i] <= faceLabels[i-1])
89 "attachDetach::detachInterface"
90 "(polyTopoChange&) const"
91 ) <<
"faceZone " << zoneMesh[faceZoneID_.
index()].name()
92 <<
" does not have mesh face labels in"
93 <<
" increasing order." <<
endl
94 <<
"Face label " << faceLabels[i]
95 <<
" at position " << i
96 <<
" is smaller than the previous value "
110 const labelList& mp = masterFaceLayer.meshPoints();
111 const edgeList& zoneLocalEdges = masterFaceLayer.edges();
113 const labelList& meshEdges = zoneMesh[faceZoneID_.
index()].meshEdges();
122 label nIntEdges = masterFaceLayer.nInternalEdges();
124 for (label curEdgeID = nIntEdges; curEdgeID < meshEdges.size(); curEdgeID++)
126 const labelList& curFaces = meshEdgeFaces[meshEdges[curEdgeID]];
128 bool edgeIsInternal =
true;
132 if (!mesh.isInternalFace(curFaces[faceI]))
135 edgeIsInternal =
false;
142 const edge&
e = zoneLocalEdges[curEdgeID];
145 addedPoints[e.start()] = mp[e.start()];
146 addedPoints[e.end()] = mp[e.end()];
152 forAll (addedPoints, pointI)
154 if (addedPoints[pointI] < 0)
156 addedPoints[pointI] =
177 const boolList& mfFlip = zoneMesh[faceZoneID_.
index()].flipMap();
178 const faceList& zoneFaces = masterFaceLayer.localFaces();
180 const faceList& faces = mesh.faces();
182 const labelList& nei = mesh.faceNeighbour();
186 const label curFaceID = mf[faceI];
189 const face oldFace = zoneFaces[faceI].reverseFace();
191 face newFace(oldFace.size());
195 newFace[pointI] = addedPoints[oldFace[pointI]];
205 faces[curFaceID].reverseFace(),
210 masterPatchID_.
index(),
230 slavePatchID_.
index(),
257 masterPatchID_.
index(),
277 slavePatchID_.
index(),
310 mesh.faceZones()[faceZoneID_.
index()].masterCells();
318 const labelList& curFaces = cells[mc[cellI]];
323 if (zoneMesh.whichZone(curFaces[faceI]) != faceZoneID_.
index())
325 masterCellFaceMap.insert(curFaces[faceI]);
338 mcMap.insert(mc[mcI]);
344 const labelList mcf = masterCellFaceMap.toc();
349 const label ownCell = own[mcf[mcfI]];
351 if (!mcMap.found(ownCell))
354 const cell& curFaces = cells[ownCell];
358 masterCellFaceMap.insert(curFaces[faceI]);
363 if (mesh.isInternalFace(mcf[mcfI]))
365 const label neiCell = nei[mcf[mcfI]];
367 if (!mcMap.found(neiCell))
370 const cell& curFaces = cells[neiCell];
374 masterCellFaceMap.insert(curFaces[faceI]);
382 Map<label> masterLayerPointMap(2*mp.size());
386 masterLayerPointMap.insert
394 const labelList masterCellFaces = masterCellFaceMap.toc();
396 forAll (masterCellFaces, faceI)
401 const label curFaceID = masterCellFaces[faceI];
403 const face& oldFace = faces[curFaceID];
405 face newFace(oldFace.size());
407 bool changed =
false;
411 if (masterLayerPointMap.found(oldFace[pointI]))
415 newFace[pointI] = masterLayerPointMap.find(oldFace[pointI])();
419 newFace[pointI] = oldFace[pointI];
426 if (mesh.isInternalFace(curFaceID))
456 mesh.boundaryMesh().whichPatch(curFaceID),
469 Pout<<
"void attachDetach::detachInterface("
470 <<
"polyTopoChange& ref) const "
471 <<
" for object " <<
name() <<
" : "
472 <<
"Finished detaching interface" <<
endl;