polyTopoChangeMap: Removed unused and redundant zone maps

This commit is contained in:
Henry Weller
2024-03-01 18:25:07 +00:00
parent 545ed8a0ee
commit e40c5324c5
6 changed files with 7 additions and 204 deletions

View File

@ -119,10 +119,6 @@ int main(int argc, char *argv[])
labelList(0), // reverseCellMap,
labelHashSet(0), // flipFaceFlux,
labelListList(0), // patchPointMap,
labelListList(0), // pointZoneMap,
labelListList(0), // faceZonePointMap,
labelListList(0), // faceZoneFaceMap,
labelListList(0), // cellZoneMap,
pointField(0), // preMotionPoints,
labelList(0), // oldPatchStarts,
labelList(0), // oldPatchNMeshPoints,

View File

@ -528,10 +528,6 @@ autoPtr<polyTopoChangeMap> reorderMesh
reverseCellOrder, // reverseCellMap,
flipFaceFlux, // flipFaceFlux,
patchPointMap, // patchPointMap,
labelListList(0), // pointZoneMap,
labelListList(0), // faceZonePointMap,
labelListList(0), // faceZoneFaceMap,
labelListList(0), // cellZoneMap,
pointField(0), // preMotionPoints,
patchStarts, // oldPatchStarts,
oldPatchNMeshPoints, // oldPatchNMeshPoints

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,10 +59,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
const labelList& reverseCellMap,
const labelHashSet& flipFaceFlux,
const labelListList& patchPointMap,
const labelListList& pointZoneMap,
const labelListList& faceZonePointMap,
const labelListList& faceZoneFaceMap,
const labelListList& cellZoneMap,
const pointField& preMotionPoints,
const labelList& oldPatchStarts,
const labelList& oldPatchNMeshPoints,
@ -89,10 +85,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
reverseCellMap_(reverseCellMap),
flipFaceFlux_(flipFaceFlux),
patchPointMap_(patchPointMap),
pointZoneMap_(pointZoneMap),
faceZonePointMap_(faceZonePointMap),
faceZoneFaceMap_(faceZoneFaceMap),
cellZoneMap_(cellZoneMap),
preMotionPoints_(preMotionPoints),
oldPatchSizes_(oldPatchStarts.size()),
oldPatchStarts_(oldPatchStarts),
@ -147,10 +139,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
labelList& reverseCellMap,
labelHashSet& flipFaceFlux,
labelListList& patchPointMap,
labelListList& pointZoneMap,
labelListList& faceZonePointMap,
labelListList& faceZoneFaceMap,
labelListList& cellZoneMap,
pointField& preMotionPoints,
labelList& oldPatchStarts,
labelList& oldPatchNMeshPoints,
@ -178,10 +166,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
reverseCellMap_(reverseCellMap, reuse),
flipFaceFlux_(flipFaceFlux),
patchPointMap_(patchPointMap, reuse),
pointZoneMap_(pointZoneMap, reuse),
faceZonePointMap_(faceZonePointMap, reuse),
faceZoneFaceMap_(faceZoneFaceMap, reuse),
cellZoneMap_(cellZoneMap, reuse),
preMotionPoints_(preMotionPoints, reuse),
oldPatchSizes_(oldPatchStarts.size()),
oldPatchStarts_(oldPatchStarts, reuse),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -233,26 +233,6 @@ class polyTopoChangeMap
//- Patch mesh point renumbering
const labelListList patchPointMap_;
//- Point zone renumbering
// For every preserved point in zone give the old position.
// For added points, the index is set to -1
const labelListList pointZoneMap_;
//- Face zone point renumbering
// For every preserved point in zone give the old position.
// For added points, the index is set to -1
const labelListList faceZonePointMap_;
//- Face zone face renumbering
// For every preserved face in zone give the old position.
// For added faces, the index is set to -1
const labelListList faceZoneFaceMap_;
//- Cell zone renumbering
// For every preserved cell in zone give the old position.
// For added cells, the index is set to -1
const labelListList cellZoneMap_;
//- Pre-motion point positions.
// This specifies the correct way of blowing up zero-volume objects
const pointField preMotionPoints_;
@ -300,10 +280,6 @@ public:
const labelList& reverseCellMap,
const labelHashSet& flipFaceFlux,
const labelListList& patchPointMap,
const labelListList& pointZoneMap,
const labelListList& faceZonePointMap,
const labelListList& faceZoneFaceMap,
const labelListList& cellZoneMap,
const pointField& preMotionPoints,
const labelList& oldPatchStarts,
const labelList& oldPatchNMeshPoints,
@ -333,10 +309,6 @@ public:
labelList& reverseCellMap,
labelHashSet& flipFaceFlux,
labelListList& patchPointMap,
labelListList& pointZoneMap,
labelListList& faceZonePointMap,
labelListList& faceZoneFaceMap,
labelListList& cellZoneMap,
pointField& preMotionPoints,
labelList& oldPatchStarts,
labelList& oldPatchNMeshPoints,
@ -566,40 +538,6 @@ public:
}
// Zone mapping
//- Point zone renumbering
// For every preserved point in zone give the old position.
// For added points, the index is set to -1
const labelListList& pointZoneMap() const
{
return pointZoneMap_;
}
//- Face zone point renumbering
// For every preserved point in zone give the old position.
// For added points, the index is set to -1
const labelListList& faceZonePointMap() const
{
return faceZonePointMap_;
}
//- Face zone face renumbering
// For every preserved face in zone give the old position.
// For added faces, the index is set to -1
const labelListList& faceZoneFaceMap() const
{
return faceZoneFaceMap_;
}
//- Cell zone renumbering
// For every preserved cell in zone give the old position.
// For added cells, the index is set to -1
const labelListList& cellZoneMap() const
{
return cellZoneMap_;
}
//- Pre-motion point positions.
// This specifies the correct way of blowing up
// zero-volume objects

View File

@ -1537,16 +1537,12 @@ void Foam::polyTopoChange::calcCellInflationMaps
void Foam::polyTopoChange::resetZones
(
const polyMesh& mesh,
polyMesh& newMesh,
labelListList& pointZoneMap,
labelListList& faceZoneFaceMap,
labelListList& cellZoneMap
polyMesh& newMesh
) const
{
// pointZones
// ~~~~~~~~~~
pointZoneMap.setSize(mesh.pointZones().size());
{
const meshPointZones& pointZones = mesh.pointZones();
@ -1589,29 +1585,6 @@ void Foam::polyTopoChange::resetZones
stableSort(addressing[zoneI]);
}
// So now we both have old zones and the new addressing.
// Invert the addressing to get pointZoneMap.
forAll(addressing, zoneI)
{
const pointZone& oldZone = pointZones[zoneI];
const labelList& newZoneAddr = addressing[zoneI];
labelList& curPzRnb = pointZoneMap[zoneI];
curPzRnb.setSize(newZoneAddr.size());
forAll(newZoneAddr, i)
{
if (newZoneAddr[i] < pointMap_.size())
{
curPzRnb[i] = oldZone.whichPoint(pointMap_[newZoneAddr[i]]);
}
else
{
curPzRnb[i] = -1;
}
}
}
// Reset the addressing on the zone
newMesh.pointZones().clearAddressing();
forAll(newMesh.pointZones(), zoneI)
@ -1632,7 +1605,6 @@ void Foam::polyTopoChange::resetZones
// faceZones
// ~~~~~~~~~
faceZoneFaceMap.setSize(mesh.faceZones().size());
{
const meshFaceZones& faceZones = mesh.faceZones();
@ -1695,32 +1667,6 @@ void Foam::polyTopoChange::resetZones
}
}
// So now we both have old zones and the new addressing.
// Invert the addressing to get faceZoneFaceMap.
forAll(addressing, zoneI)
{
const faceZone& oldZone = faceZones[zoneI];
const labelList& newZoneAddr = addressing[zoneI];
labelList& curFzFaceRnb = faceZoneFaceMap[zoneI];
curFzFaceRnb.setSize(newZoneAddr.size());
forAll(newZoneAddr, i)
{
if (newZoneAddr[i] < faceMap_.size())
{
curFzFaceRnb[i] =
oldZone.whichFace(faceMap_[newZoneAddr[i]]);
}
else
{
curFzFaceRnb[i] = -1;
}
}
}
// Reset the addressing on the zone
newMesh.faceZones().clearAddressing();
forAll(newMesh.faceZones(), zoneI)
@ -1745,7 +1691,6 @@ void Foam::polyTopoChange::resetZones
// cellZones
// ~~~~~~~~~
cellZoneMap.setSize(mesh.cellZones().size());
{
const meshCellZones& cellZones = mesh.cellZones();
@ -1790,31 +1735,6 @@ void Foam::polyTopoChange::resetZones
stableSort(addressing[zoneI]);
}
// So now we both have old zones and the new addressing.
// Invert the addressing to get cellZoneMap.
forAll(addressing, zoneI)
{
const cellZone& oldZone = cellZones[zoneI];
const labelList& newZoneAddr = addressing[zoneI];
labelList& curCellRnb = cellZoneMap[zoneI];
curCellRnb.setSize(newZoneAddr.size());
forAll(newZoneAddr, i)
{
if (newZoneAddr[i] < cellMap_.size())
{
curCellRnb[i] =
oldZone.whichCell(cellMap_[newZoneAddr[i]]);
}
else
{
curCellRnb[i] = -1;
}
}
}
// Reset the addressing on the zone
newMesh.cellZones().clearAddressing();
forAll(newMesh.cellZones(), zoneI)
@ -3124,15 +3044,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::changeMesh
// Zones
// ~~~~~
// Inverse of point/face/cell zone addressing.
// For every preserved point/face/cells in zone give the old position.
// For added points, the index is set to -1
labelListList pointZoneMap(mesh.pointZones().size());
labelListList faceZoneFaceMap(mesh.faceZones().size());
labelListList cellZoneMap(mesh.cellZones().size());
resetZones(mesh, mesh, pointZoneMap, faceZoneFaceMap, cellZoneMap);
resetZones(mesh, mesh);
// Clear zone info
{
@ -3191,12 +3103,6 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::changeMesh
patchPointMap,
pointZoneMap,
faceZonePointMap,
faceZoneFaceMap,
cellZoneMap,
newPoints, // if empty signals no inflation.
oldPatchStarts,
oldPatchNMeshPoints,
@ -3415,15 +3321,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
}
newMesh.addZones(pZonePtrs, fZonePtrs, cZonePtrs);
// Inverse of point/face/cell zone addressing.
// For every preserved point/face/cells in zone give the old position.
// For added points, the index is set to -1
labelListList pointZoneMap(mesh.pointZones().size());
labelListList faceZoneFaceMap(mesh.faceZones().size());
labelListList cellZoneMap(mesh.cellZones().size());
resetZones(mesh, newMesh, pointZoneMap, faceZoneFaceMap, cellZoneMap);
resetZones(mesh, newMesh);
// Clear zone info
{
@ -3487,12 +3385,6 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
patchPointMap,
pointZoneMap,
faceZonePointMap,
faceZoneFaceMap,
cellZoneMap,
newPoints, // if empty signals no inflation.
oldPatchStarts,
oldPatchNMeshPoints,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -364,10 +364,7 @@ class polyTopoChange
void resetZones
(
const polyMesh&, // mesh to get existing info from
polyMesh&, // mesh to change zones on
labelListList&,
labelListList&,
labelListList&
polyMesh& // mesh to change zones on
) const;
void calcFaceZonePointMap