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;
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
249 const label oldPatchi = patchMap[patchi];
253 newBoundary[patchi] = oldPatches[oldPatchi].
clone
255 newMesh.boundaryMesh(),
270 newMesh.boundaryMesh(),
275 newMesh.addFvPatches(newBoundary);
290 oldPointZones[i].
name(),
304 oldFaceZones[i].
name(),
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