polyTopoChangeMap: Removed unused and redundant zone maps
This commit is contained in:
@ -119,10 +119,6 @@ int main(int argc, char *argv[])
|
|||||||
labelList(0), // reverseCellMap,
|
labelList(0), // reverseCellMap,
|
||||||
labelHashSet(0), // flipFaceFlux,
|
labelHashSet(0), // flipFaceFlux,
|
||||||
labelListList(0), // patchPointMap,
|
labelListList(0), // patchPointMap,
|
||||||
labelListList(0), // pointZoneMap,
|
|
||||||
labelListList(0), // faceZonePointMap,
|
|
||||||
labelListList(0), // faceZoneFaceMap,
|
|
||||||
labelListList(0), // cellZoneMap,
|
|
||||||
pointField(0), // preMotionPoints,
|
pointField(0), // preMotionPoints,
|
||||||
labelList(0), // oldPatchStarts,
|
labelList(0), // oldPatchStarts,
|
||||||
labelList(0), // oldPatchNMeshPoints,
|
labelList(0), // oldPatchNMeshPoints,
|
||||||
|
|||||||
@ -528,10 +528,6 @@ autoPtr<polyTopoChangeMap> reorderMesh
|
|||||||
reverseCellOrder, // reverseCellMap,
|
reverseCellOrder, // reverseCellMap,
|
||||||
flipFaceFlux, // flipFaceFlux,
|
flipFaceFlux, // flipFaceFlux,
|
||||||
patchPointMap, // patchPointMap,
|
patchPointMap, // patchPointMap,
|
||||||
labelListList(0), // pointZoneMap,
|
|
||||||
labelListList(0), // faceZonePointMap,
|
|
||||||
labelListList(0), // faceZoneFaceMap,
|
|
||||||
labelListList(0), // cellZoneMap,
|
|
||||||
pointField(0), // preMotionPoints,
|
pointField(0), // preMotionPoints,
|
||||||
patchStarts, // oldPatchStarts,
|
patchStarts, // oldPatchStarts,
|
||||||
oldPatchNMeshPoints, // oldPatchNMeshPoints
|
oldPatchNMeshPoints, // oldPatchNMeshPoints
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -59,10 +59,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
|
|||||||
const labelList& reverseCellMap,
|
const labelList& reverseCellMap,
|
||||||
const labelHashSet& flipFaceFlux,
|
const labelHashSet& flipFaceFlux,
|
||||||
const labelListList& patchPointMap,
|
const labelListList& patchPointMap,
|
||||||
const labelListList& pointZoneMap,
|
|
||||||
const labelListList& faceZonePointMap,
|
|
||||||
const labelListList& faceZoneFaceMap,
|
|
||||||
const labelListList& cellZoneMap,
|
|
||||||
const pointField& preMotionPoints,
|
const pointField& preMotionPoints,
|
||||||
const labelList& oldPatchStarts,
|
const labelList& oldPatchStarts,
|
||||||
const labelList& oldPatchNMeshPoints,
|
const labelList& oldPatchNMeshPoints,
|
||||||
@ -89,10 +85,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
|
|||||||
reverseCellMap_(reverseCellMap),
|
reverseCellMap_(reverseCellMap),
|
||||||
flipFaceFlux_(flipFaceFlux),
|
flipFaceFlux_(flipFaceFlux),
|
||||||
patchPointMap_(patchPointMap),
|
patchPointMap_(patchPointMap),
|
||||||
pointZoneMap_(pointZoneMap),
|
|
||||||
faceZonePointMap_(faceZonePointMap),
|
|
||||||
faceZoneFaceMap_(faceZoneFaceMap),
|
|
||||||
cellZoneMap_(cellZoneMap),
|
|
||||||
preMotionPoints_(preMotionPoints),
|
preMotionPoints_(preMotionPoints),
|
||||||
oldPatchSizes_(oldPatchStarts.size()),
|
oldPatchSizes_(oldPatchStarts.size()),
|
||||||
oldPatchStarts_(oldPatchStarts),
|
oldPatchStarts_(oldPatchStarts),
|
||||||
@ -147,10 +139,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
|
|||||||
labelList& reverseCellMap,
|
labelList& reverseCellMap,
|
||||||
labelHashSet& flipFaceFlux,
|
labelHashSet& flipFaceFlux,
|
||||||
labelListList& patchPointMap,
|
labelListList& patchPointMap,
|
||||||
labelListList& pointZoneMap,
|
|
||||||
labelListList& faceZonePointMap,
|
|
||||||
labelListList& faceZoneFaceMap,
|
|
||||||
labelListList& cellZoneMap,
|
|
||||||
pointField& preMotionPoints,
|
pointField& preMotionPoints,
|
||||||
labelList& oldPatchStarts,
|
labelList& oldPatchStarts,
|
||||||
labelList& oldPatchNMeshPoints,
|
labelList& oldPatchNMeshPoints,
|
||||||
@ -178,10 +166,6 @@ Foam::polyTopoChangeMap::polyTopoChangeMap
|
|||||||
reverseCellMap_(reverseCellMap, reuse),
|
reverseCellMap_(reverseCellMap, reuse),
|
||||||
flipFaceFlux_(flipFaceFlux),
|
flipFaceFlux_(flipFaceFlux),
|
||||||
patchPointMap_(patchPointMap, reuse),
|
patchPointMap_(patchPointMap, reuse),
|
||||||
pointZoneMap_(pointZoneMap, reuse),
|
|
||||||
faceZonePointMap_(faceZonePointMap, reuse),
|
|
||||||
faceZoneFaceMap_(faceZoneFaceMap, reuse),
|
|
||||||
cellZoneMap_(cellZoneMap, reuse),
|
|
||||||
preMotionPoints_(preMotionPoints, reuse),
|
preMotionPoints_(preMotionPoints, reuse),
|
||||||
oldPatchSizes_(oldPatchStarts.size()),
|
oldPatchSizes_(oldPatchStarts.size()),
|
||||||
oldPatchStarts_(oldPatchStarts, reuse),
|
oldPatchStarts_(oldPatchStarts, reuse),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -233,26 +233,6 @@ class polyTopoChangeMap
|
|||||||
//- Patch mesh point renumbering
|
//- Patch mesh point renumbering
|
||||||
const labelListList patchPointMap_;
|
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.
|
//- Pre-motion point positions.
|
||||||
// This specifies the correct way of blowing up zero-volume objects
|
// This specifies the correct way of blowing up zero-volume objects
|
||||||
const pointField preMotionPoints_;
|
const pointField preMotionPoints_;
|
||||||
@ -300,10 +280,6 @@ public:
|
|||||||
const labelList& reverseCellMap,
|
const labelList& reverseCellMap,
|
||||||
const labelHashSet& flipFaceFlux,
|
const labelHashSet& flipFaceFlux,
|
||||||
const labelListList& patchPointMap,
|
const labelListList& patchPointMap,
|
||||||
const labelListList& pointZoneMap,
|
|
||||||
const labelListList& faceZonePointMap,
|
|
||||||
const labelListList& faceZoneFaceMap,
|
|
||||||
const labelListList& cellZoneMap,
|
|
||||||
const pointField& preMotionPoints,
|
const pointField& preMotionPoints,
|
||||||
const labelList& oldPatchStarts,
|
const labelList& oldPatchStarts,
|
||||||
const labelList& oldPatchNMeshPoints,
|
const labelList& oldPatchNMeshPoints,
|
||||||
@ -333,10 +309,6 @@ public:
|
|||||||
labelList& reverseCellMap,
|
labelList& reverseCellMap,
|
||||||
labelHashSet& flipFaceFlux,
|
labelHashSet& flipFaceFlux,
|
||||||
labelListList& patchPointMap,
|
labelListList& patchPointMap,
|
||||||
labelListList& pointZoneMap,
|
|
||||||
labelListList& faceZonePointMap,
|
|
||||||
labelListList& faceZoneFaceMap,
|
|
||||||
labelListList& cellZoneMap,
|
|
||||||
pointField& preMotionPoints,
|
pointField& preMotionPoints,
|
||||||
labelList& oldPatchStarts,
|
labelList& oldPatchStarts,
|
||||||
labelList& oldPatchNMeshPoints,
|
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.
|
//- Pre-motion point positions.
|
||||||
// This specifies the correct way of blowing up
|
// This specifies the correct way of blowing up
|
||||||
// zero-volume objects
|
// zero-volume objects
|
||||||
|
|||||||
@ -1537,16 +1537,12 @@ void Foam::polyTopoChange::calcCellInflationMaps
|
|||||||
void Foam::polyTopoChange::resetZones
|
void Foam::polyTopoChange::resetZones
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
polyMesh& newMesh,
|
polyMesh& newMesh
|
||||||
labelListList& pointZoneMap,
|
|
||||||
labelListList& faceZoneFaceMap,
|
|
||||||
labelListList& cellZoneMap
|
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// pointZones
|
// pointZones
|
||||||
// ~~~~~~~~~~
|
// ~~~~~~~~~~
|
||||||
|
|
||||||
pointZoneMap.setSize(mesh.pointZones().size());
|
|
||||||
{
|
{
|
||||||
const meshPointZones& pointZones = mesh.pointZones();
|
const meshPointZones& pointZones = mesh.pointZones();
|
||||||
|
|
||||||
@ -1589,29 +1585,6 @@ void Foam::polyTopoChange::resetZones
|
|||||||
stableSort(addressing[zoneI]);
|
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
|
// Reset the addressing on the zone
|
||||||
newMesh.pointZones().clearAddressing();
|
newMesh.pointZones().clearAddressing();
|
||||||
forAll(newMesh.pointZones(), zoneI)
|
forAll(newMesh.pointZones(), zoneI)
|
||||||
@ -1632,7 +1605,6 @@ void Foam::polyTopoChange::resetZones
|
|||||||
// faceZones
|
// faceZones
|
||||||
// ~~~~~~~~~
|
// ~~~~~~~~~
|
||||||
|
|
||||||
faceZoneFaceMap.setSize(mesh.faceZones().size());
|
|
||||||
{
|
{
|
||||||
const meshFaceZones& faceZones = mesh.faceZones();
|
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
|
// Reset the addressing on the zone
|
||||||
newMesh.faceZones().clearAddressing();
|
newMesh.faceZones().clearAddressing();
|
||||||
forAll(newMesh.faceZones(), zoneI)
|
forAll(newMesh.faceZones(), zoneI)
|
||||||
@ -1745,7 +1691,6 @@ void Foam::polyTopoChange::resetZones
|
|||||||
// cellZones
|
// cellZones
|
||||||
// ~~~~~~~~~
|
// ~~~~~~~~~
|
||||||
|
|
||||||
cellZoneMap.setSize(mesh.cellZones().size());
|
|
||||||
{
|
{
|
||||||
const meshCellZones& cellZones = mesh.cellZones();
|
const meshCellZones& cellZones = mesh.cellZones();
|
||||||
|
|
||||||
@ -1790,31 +1735,6 @@ void Foam::polyTopoChange::resetZones
|
|||||||
stableSort(addressing[zoneI]);
|
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
|
// Reset the addressing on the zone
|
||||||
newMesh.cellZones().clearAddressing();
|
newMesh.cellZones().clearAddressing();
|
||||||
forAll(newMesh.cellZones(), zoneI)
|
forAll(newMesh.cellZones(), zoneI)
|
||||||
@ -3124,15 +3044,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::changeMesh
|
|||||||
|
|
||||||
// Zones
|
// Zones
|
||||||
// ~~~~~
|
// ~~~~~
|
||||||
|
resetZones(mesh, mesh);
|
||||||
// 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);
|
|
||||||
|
|
||||||
// Clear zone info
|
// Clear zone info
|
||||||
{
|
{
|
||||||
@ -3191,12 +3103,6 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::changeMesh
|
|||||||
|
|
||||||
patchPointMap,
|
patchPointMap,
|
||||||
|
|
||||||
pointZoneMap,
|
|
||||||
|
|
||||||
faceZonePointMap,
|
|
||||||
faceZoneFaceMap,
|
|
||||||
cellZoneMap,
|
|
||||||
|
|
||||||
newPoints, // if empty signals no inflation.
|
newPoints, // if empty signals no inflation.
|
||||||
oldPatchStarts,
|
oldPatchStarts,
|
||||||
oldPatchNMeshPoints,
|
oldPatchNMeshPoints,
|
||||||
@ -3415,15 +3321,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
newMesh.addZones(pZonePtrs, fZonePtrs, cZonePtrs);
|
newMesh.addZones(pZonePtrs, fZonePtrs, cZonePtrs);
|
||||||
|
resetZones(mesh, newMesh);
|
||||||
// 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);
|
|
||||||
|
|
||||||
// Clear zone info
|
// Clear zone info
|
||||||
{
|
{
|
||||||
@ -3487,12 +3385,6 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
|
|||||||
|
|
||||||
patchPointMap,
|
patchPointMap,
|
||||||
|
|
||||||
pointZoneMap,
|
|
||||||
|
|
||||||
faceZonePointMap,
|
|
||||||
faceZoneFaceMap,
|
|
||||||
cellZoneMap,
|
|
||||||
|
|
||||||
newPoints, // if empty signals no inflation.
|
newPoints, // if empty signals no inflation.
|
||||||
oldPatchStarts,
|
oldPatchStarts,
|
||||||
oldPatchNMeshPoints,
|
oldPatchNMeshPoints,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -364,10 +364,7 @@ class polyTopoChange
|
|||||||
void resetZones
|
void resetZones
|
||||||
(
|
(
|
||||||
const polyMesh&, // mesh to get existing info from
|
const polyMesh&, // mesh to get existing info from
|
||||||
polyMesh&, // mesh to change zones on
|
polyMesh& // mesh to change zones on
|
||||||
labelListList&,
|
|
||||||
labelListList&,
|
|
||||||
labelListList&
|
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void calcFaceZonePointMap
|
void calcFaceZonePointMap
|
||||||
|
|||||||
Reference in New Issue
Block a user