37void Foam::polyTopoChange::reorder
39 const labelUList& oldToNew,
40 DynamicList<Type>& lst
44 DynamicList<Type> oldLst(lst);
48 const label newIdx = oldToNew[i];
52 lst[newIdx] = std::move(oldLst[i]);
59void Foam::polyTopoChange::renumberKey
69 const label newKey = oldToNew[iter.key()];
73 newMap.insert(newKey, iter.val());
84 autoPtr<Type>& newMeshPtr,
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;
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);
276 oldPointZones[i].
name(),
290 oldFaceZones[i].
name(),
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
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A HashTable to objects of type <T> with a label key.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of entries in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Empty front and back plane patch. Used for 2-D geometries.
A subset of mesh faces organised as a primitive patch.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
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.
const scalarField & cellVolumes() const
label nPoints() const noexcept
Number of mesh points.
label nCells() const noexcept
Number of mesh cells.
label nFaces() const noexcept
Number of mesh faces.
static const word null
An empty word.
labelHashSet used(const bitSet &select)
Convert a bitset to a labelHashSet of the indices used.
Namespace for handling debugging switches.
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
ZoneMesh< pointZone, polyMesh > pointZoneMesh
A ZoneMesh with pointZone content on a polyMesh.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with faceZone content on a polyMesh.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
ZoneMesh< cellZone, polyMesh > cellZoneMesh
A ZoneMesh with cellZone content on a polyMesh.
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...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.