44 meshModPtr_.reset(
new polyTopoChange(mesh_));
52 Foam::repatchPolyTopoChanger::repatchPolyTopoChanger(polyMesh&
mesh)
69 <<
"Cannot change patches after having changed faces. " <<
nl
70 <<
"Please call changePatches first."
73 meshModPtr_.reset(
nullptr);
74 mesh_.removeBoundary();
90 faceID >= mesh_.faces().size()
91 ||
patchID >= mesh_.boundaryMesh().size()
92 || mesh_.isInternalFace(faceID)
96 <<
" patchID: " <<
patchID <<
". "
97 <<
"Labels out of range or internal face."
102 const label
zoneID = mesh_.faceZones().whichZone(faceID);
104 bool zoneFlip =
false;
108 const faceZone& fZone = mesh_.faceZones()[
zoneID];
110 zoneFlip = fZone.flipMap()[fZone.whichFace(faceID)];
117 mesh_.faces()[faceID],
119 mesh_.faceOwner()[faceID],
141 if (faceID > mesh_.faces().size())
153 mesh_.faces()[faceID],
155 mesh_.faceOwner()[faceID],
156 mesh_.faceNeighbour()[faceID],
158 mesh_.boundaryMesh().whichPatch(faceID),
176 if (faceID > mesh_.faces().size())
184 const face&
f = mesh_.faces()[faceID];
186 if ((fp < 0) || (fp >=
f.size()))
189 <<
"Error in definition. Face point: " << fp
190 <<
"indexes out of face " <<
f
194 label
patchID = mesh_.boundaryMesh().whichPatch(faceID);
196 const label
zoneID = mesh_.faceZones().whichZone(faceID);
198 bool zoneFlip =
false;
202 const faceZone& fZone = mesh_.faceZones()[
zoneID];
204 zoneFlip = fZone.flipMap()[fZone.whichFace(faceID)];
216 mesh_.faceOwner()[faceID],
230 face newFace(
f.size());
236 newFace[i] =
f[fVert++];
238 if (fVert ==
f.size())
251 mesh_.faceOwner()[faceID],
267 meshMod().changeMesh(mesh_,
false);
270 meshModPtr_.reset(
nullptr);