37 void Foam::polyTopoChange::reorder
40 DynamicList<Type>& lst
44 DynamicList<Type> oldLst(lst);
48 const label newIdx = oldToNew[i];
52 lst[newIdx] = std::move(oldLst[i]);
59 void Foam::polyTopoChange::renumberKey
65 Map<Type> newMap(map.capacity());
69 const label newKey = oldToNew[iter.key()];
73 newMap.insert(newKey, iter.val());
88 const bool syncParallel,
89 const bool orderCells,
90 const bool orderPoints
95 Pout<<
"polyTopoChange::changeMesh" 96 <<
"(autoPtr<fvMesh>&, const IOobject&, const fvMesh&" 97 <<
", const bool, const bool, const bool)" 110 label nInternalPoints;
115 List<objectMap> pointsFromPoints;
116 List<objectMap> facesFromPoints;
117 List<objectMap> facesFromEdges;
118 List<objectMap> facesFromFaces;
119 List<objectMap> cellsFromPoints;
120 List<objectMap> cellsFromEdges;
121 List<objectMap> cellsFromFaces;
122 List<objectMap> cellsFromCells;
125 List<Map<label>> oldPatchMeshPointMaps;
128 List<Map<label>> oldFaceZoneMeshPointMaps;
151 oldPatchMeshPointMaps,
154 oldFaceZoneMeshPointMaps
174 std::move(newPoints),
176 std::move(faceOwner_),
177 std::move(faceNeighbour_)
180 Type& newMesh = *newMeshPtr;
184 retiredPoints_.clearStorage();
185 region_.clearStorage();
192 label nAdd, nInflate, nMerge, nRemove;
193 countMap(pointMap_, reversePointMap_, nAdd, nInflate, nMerge, nRemove);
195 <<
" added(from point):" << nAdd
196 <<
" added(from nothing):" << nInflate
197 <<
" merged(into other point):" << nMerge
198 <<
" removed:" << nRemove
201 countMap(faceMap_, reverseFaceMap_, nAdd, nInflate, nMerge, nRemove);
203 <<
" added(from face):" << nAdd
204 <<
" added(inflated):" << nInflate
205 <<
" merged(into other face):" << nMerge
206 <<
" removed:" << nRemove
209 countMap(cellMap_, reverseCellMap_, nAdd, nInflate, nMerge, nRemove);
211 <<
" added(from cell):" << nAdd
212 <<
" added(inflated):" << nInflate
213 <<
" merged(into other cell):" << nMerge
214 <<
" removed:" << nRemove
227 const label oldPatchi = patchMap[patchi];
234 oldPatches[oldPatchi].clone
236 newMesh.boundaryMesh(),
255 newMesh.boundaryMesh(),
261 newMesh.addFvPatches(newBoundary);
270 List<pointZone*> pZonePtrs(oldPointZones.size());
274 pZonePtrs[i] =
new pointZone
276 oldPointZones[i].
name(),
284 List<faceZone*> fZonePtrs(oldFaceZones.size());
288 fZonePtrs[i] =
new faceZone
290 oldFaceZones[i].
name(),
298 List<cellZone*> cZonePtrs(oldCellZones.size());
302 cZonePtrs[i] =
new cellZone
304 oldCellZones[i].
name(),
311 newMesh.addZones(pZonePtrs, fZonePtrs, cZonePtrs);
320 resetZones(
mesh, newMesh, pointZoneMap, faceZoneFaceMap, cellZoneMap);
324 pointZone_.clearStorage();
325 faceZone_.clearStorage();
326 faceZoneFlip_.clearStorage();
327 cellZone_.clearStorage();
336 oldPatchMeshPointMaps,
338 newMesh.boundaryMesh(),
344 calcFaceZonePointMap(newMesh, oldFaceZoneMeshPointMaps, faceZonePointMap);
349 writeMeshStats(newMesh,
Pout);
407 const bool syncParallel,
408 const bool orderCells,
409 const bool orderPoints
void size(const label n)
Older name for setAddressableSize.
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with the type faceZone.
labelHashSet used(const bitSet &select)
Convert a bitset to a labelHashSet of the indices used.
label nPoints() const noexcept
Number of mesh points.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label nFaces() const noexcept
Number of mesh faces.
List< labelList > labelListList
List of labelList.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
vectorField pointField
pointField is a vectorField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
autoPtr< mapPolyMesh > makeMesh(autoPtr< Type > &newMesh, const IOobject &io, const polyMesh &mesh, const labelUList &patchMap, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Create new mesh with old mesh patches. Additional dictionaries.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
label size() const noexcept
The number of entries in the list.
static const word null
An empty word.
ZoneMesh< pointZone, polyMesh > pointZoneMesh
A ZoneMesh with the type pointZone.
int debug
Static debugging option.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
label nCells() const noexcept
Number of mesh cells.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Defines the attributes of an object for which implicit objectRegistry management is supported...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
ZoneMesh< cellZone, polyMesh > cellZoneMesh
A ZoneMesh with the type cellZone.
forAllConstIters(mixture.phases(), phase)
const scalarField & cellVolumes() const