37 void Foam::polyTopoChange::reorder
40 DynamicList<Type>& lst
44 DynamicList<Type> oldLst(lst);
48 const label newIdx = oldToNew[i];
52 lst[newIdx] = oldLst[i];
59 void Foam::polyTopoChange::reorder
62 List<DynamicList<Type>>& lst
66 List<DynamicList<Type>> oldLst(lst);
70 const label newIdx = oldToNew[i];
74 lst[newIdx].transfer(oldLst[i]);
81 void Foam::polyTopoChange::renumberKey
87 Map<Type> newMap(map.capacity());
91 const label newKey = oldToNew[iter.key()];
95 newMap.insert(newKey, iter.val());
110 const bool syncParallel,
111 const bool orderCells,
112 const bool orderPoints
117 Pout<<
"polyTopoChange::changeMesh"
118 <<
"(autoPtr<fvMesh>&, const IOobject&, const fvMesh&"
119 <<
", const bool, const bool, const bool)"
132 label nInternalPoints;
137 List<objectMap> pointsFromPoints;
138 List<objectMap> facesFromPoints;
139 List<objectMap> facesFromEdges;
140 List<objectMap> facesFromFaces;
141 List<objectMap> cellsFromPoints;
142 List<objectMap> cellsFromEdges;
143 List<objectMap> cellsFromFaces;
144 List<objectMap> cellsFromCells;
147 List<Map<label>> oldPatchMeshPointMaps;
150 List<Map<label>> oldFaceZoneMeshPointMaps;
173 oldPatchMeshPointMaps,
176 oldFaceZoneMeshPointMaps
196 std::move(newPoints),
198 std::move(faceOwner_),
199 std::move(faceNeighbour_)
202 Type& newMesh = *newMeshPtr;
206 retiredPoints_.clearStorage();
207 region_.clearStorage();
214 label nAdd, nInflate, nMerge, nRemove;
215 countMap(pointMap_, reversePointMap_, nAdd, nInflate, nMerge, nRemove);
217 <<
" added(from point):" << nAdd
218 <<
" added(from nothing):" << nInflate
219 <<
" merged(into other point):" << nMerge
220 <<
" removed:" << nRemove
223 countMap(faceMap_, reverseFaceMap_, nAdd, nInflate, nMerge, nRemove);
225 <<
" added(from face):" << nAdd
226 <<
" added(inflated):" << nInflate
227 <<
" merged(into other face):" << nMerge
228 <<
" removed:" << nRemove
231 countMap(cellMap_, reverseCellMap_, nAdd, nInflate, nMerge, nRemove);
233 <<
" added(from cell):" << nAdd
234 <<
" added(inflated):" << nInflate
235 <<
" merged(into other cell):" << nMerge
236 <<
" removed:" << nRemove
245 List<polyPatch*> newBoundary(patchMap.
size());
249 const label oldPatchi = patchMap[patchi];
253 newBoundary[patchi] = oldPatches[oldPatchi].clone
255 newMesh.boundaryMesh(),
264 newBoundary[patchi] =
new emptyPolyPatch
270 newMesh.boundaryMesh(),
275 newMesh.addFvPatches(newBoundary);
284 List<pointZone*> pZonePtrs(oldPointZones.size());
288 pZonePtrs[i] =
new pointZone
290 oldPointZones[i].
name(),
298 List<faceZone*> fZonePtrs(oldFaceZones.size());
302 fZonePtrs[i] =
new faceZone
304 oldFaceZones[i].
name(),
312 List<cellZone*> cZonePtrs(oldCellZones.size());
316 cZonePtrs[i] =
new cellZone
318 oldCellZones[i].
name(),
325 newMesh.addZones(pZonePtrs, fZonePtrs, cZonePtrs);
334 resetZones(
mesh, newMesh, pointZoneMap, faceZoneFaceMap, cellZoneMap);
338 pointZone_.clearStorage();
339 faceZone_.clearStorage();
340 faceZoneFlip_.clearStorage();
341 cellZone_.clearStorage();
350 oldPatchMeshPointMaps,
352 newMesh.boundaryMesh(),
358 calcFaceZonePointMap(newMesh, oldFaceZoneMeshPointMaps, faceZonePointMap);
363 writeMeshStats(newMesh,
Pout);
421 const bool syncParallel,
422 const bool orderCells,
423 const bool orderPoints