cellZone, faceZone, pointZone: Removed internal index

Zones are now completely dynamic, i.e. the number of zones of each type can
change during the run, e.g. by run-time mesh-to-mesh mapping onto meshes with
different zones used to control mesh motion.  This means that the index of each
zone may change during the run and so it better that the zones do not cache
their own index but it is looked-up from the zone list using findIndex when
required.
This commit is contained in:
Henry Weller
2024-01-31 14:58:43 +00:00
parent a3e38977c6
commit 6d05a6c425
39 changed files with 96 additions and 211 deletions

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -635,7 +635,6 @@ int main(int argc, char *argv[])
patchNames[patchi],
bFaceLabels,
boolList(bFaceLabels.size(), false),
fz.size(),
pShapeMesh.faceZones()
)
);
@ -678,7 +677,6 @@ int main(int argc, char *argv[])
(
cellTypes[cellType],
addr,
j,
pShapeMesh.cellZones()
)
);

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
@ -1198,7 +1198,6 @@ int main(int argc, char *argv[])
(
name,
labelList(0),
cellZonei,
mesh.cellZones()
)
);
@ -1229,7 +1228,6 @@ int main(int argc, char *argv[])
name,
labelList(0),
boolList(0),
faceZonei,
mesh.faceZones()
)
);

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
@ -1623,7 +1623,6 @@ int main(int argc, char *argv[])
(
name,
cls,
cnt,
pShapeMesh.cellZones()
);
@ -1647,7 +1646,6 @@ int main(int argc, char *argv[])
name,
zoneFaces,
boolList(zoneFaces.size(), false),
cnt,
pShapeMesh.faceZones()
);

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
@ -1045,7 +1045,6 @@ int main(int argc, char *argv[])
(
zoneName,
zoneCells[zoneI],
nValidCellZones,
mesh.cellZones()
);
nValidCellZones++;
@ -1085,7 +1084,6 @@ int main(int argc, char *argv[])
zoneName,
zoneFaces[zoneI],
boolList(zoneFaces[zoneI].size(), true),
nValidFaceZones,
mesh.faceZones()
);
nValidFaceZones++;

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1213,7 +1213,6 @@ int main(int argc, char *argv[])
(
name,
cellZones[name],
cnt,
mesh.cellZones()
);
}
@ -1292,7 +1291,6 @@ int main(int argc, char *argv[])
faceZones.toc()[cnt],
indices,
boolList(indices.size(),false),
cnt,
mesh.faceZones()
);
}

View File

@ -311,7 +311,6 @@ int main(int argc, char *argv[])
(
iter.key(),
zoneCells[zoneI].shrink(),
zoneI,
mesh.cellZones()
);
}

View File

@ -892,7 +892,6 @@ int main(int argc, char *argv[])
cutZoneName,
frontPatchFaces,
boolList(frontPatchFaces.size(), false),
0,
mesh.faceZones()
)
);

View File

@ -185,6 +185,7 @@ label createFaces
const bool internalFacesOnly,
const fvMesh& mesh,
const faceZone& fZone,
const label fZonei,
const label newOwnerPatchi,
const label newNeighbourPatchi,
polyTopoChange& meshMod,
@ -213,7 +214,7 @@ label createFaces
mesh.faceOwner()[facei],// owner
false, // face flip
newOwnerPatchi, // patch for face
fZone.index(), // zone for face
fZonei, // zone for face
false, // face flip in zone
modifiedFace // modify or add status
);
@ -232,7 +233,7 @@ label createFaces
mesh.faceNeighbour()[facei],// owner
true, // face flip
newOwnerPatchi, // patch for face
fZone.index(), // zone for face
fZonei, // zone for face
false, // face flip in zone
modifiedFace // modify or add status
);
@ -260,7 +261,7 @@ label createFaces
mesh.faceNeighbour()[facei], // owner
true, // face flip
newNeighbourPatchi, // patch for face
fZone.index(), // zone for face
fZonei, // zone for face
true, // face flip in zone
modifiedFace // modify or add
);
@ -276,7 +277,7 @@ label createFaces
mesh.faceOwner()[facei],// owner
false, // face flip
newNeighbourPatchi, // patch for face
fZone.index(), // zone for face
fZonei, // zone for face
true, // face flip in zone
modifiedFace // modify or add status
);
@ -324,7 +325,7 @@ label createFaces
mesh.faceOwner()[facei], // owner
false, // face flip
newPp.index(), // patch for face
fZone.index(), // zone for face
fZonei, // zone for face
fZone.flipMap()[zoneFacei], // face flip in zone
modifiedFace // modify or add
);
@ -426,7 +427,7 @@ int main(int argc, char *argv[])
mesh.faceZones().set
(
sz,
new faceZone(name, addr, flip, sz, mesh.faceZones())
new faceZone(name, addr, flip, mesh.faceZones())
);
}
}
@ -479,7 +480,7 @@ int main(int argc, char *argv[])
mesh.faceZones().set
(
zoneID,
new faceZone(name, addr, flip, zoneID, mesh.faceZones())
new faceZone(name, addr, flip, mesh.faceZones())
);
}
@ -608,7 +609,8 @@ int main(int argc, char *argv[])
{
const word& groupName = selectors[selectorI].name();
const faceZone& fZone = mesh.faceZones()[groupName];
const label fZonei = mesh.faceZones().findIndex(groupName);
const faceZone& fZone = mesh.faceZones()[fZonei];
const dictionary& dict =
selectors[selectorI].dict().optionalSubDict("patches");
@ -635,6 +637,7 @@ int main(int argc, char *argv[])
internalFacesOnly,
mesh,
fZone,
fZonei,
newPatchIDs[0],
newPatchIDs[1],
meshMod,

View File

@ -450,7 +450,6 @@ void Foam::mergePolyMesh::merge()
(
pointZoneNames_[zoneI],
labelList(),
zoneI,
mesh_.pointZones()
)
);
@ -477,7 +476,6 @@ void Foam::mergePolyMesh::merge()
(
cellZoneNames_[zoneI],
labelList(),
zoneI,
mesh_.cellZones()
)
);
@ -505,7 +503,6 @@ void Foam::mergePolyMesh::merge()
faceZoneNames_[zoneI],
labelList(),
boolList(),
zoneI,
mesh_.faceZones()
)
);

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
@ -125,7 +125,6 @@ int main(int argc, char *argv[])
(
set.name(), // name
pointLabels, // addressing
sz, // index
mesh.pointZones() // meshPointZones
)
);
@ -257,7 +256,6 @@ int main(int argc, char *argv[])
set.name(), // name
addressing.shrink(), // addressing
flipMap.shrink(), // flipmap
sz, // index
mesh.faceZones() // meshFaceZones
)
);
@ -305,7 +303,6 @@ int main(int argc, char *argv[])
(
set.name(), // name
cellLabels, // addressing
sz, // index
mesh.cellZones() // meshCellZones
)
);

View File

@ -1838,7 +1838,6 @@ int main(int argc, char *argv[])
(
zoneName, // name
regionCells, // addressing
zoneI, // index
cellZones // meshCellZones
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -181,7 +181,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
(
"dummyPointZone",
labelList(0),
0,
dummyMesh.pointZones()
)
);
@ -193,7 +192,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
"dummyFaceZone",
labelList(0),
boolList(0),
0,
dummyMesh.faceZones()
)
);
@ -204,7 +202,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
(
"dummyCellZone",
labelList(0),
0,
dummyMesh.cellZones()
)
);
@ -296,7 +293,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
(
pointZoneNames[i],
labelList(0),
i,
mesh.pointZones()
);
}
@ -308,7 +304,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
faceZoneNames[i],
labelList(0),
boolList(0),
i,
mesh.faceZones()
);
}
@ -319,7 +314,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
(
cellZoneNames[i],
labelList(0),
i,
mesh.cellZones()
);
}

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
@ -259,11 +259,12 @@ int main(int argc, char *argv[])
// Collect faces on faceZones
forAllConstIter(labelHashSet, includeFaceZones, iter)
{
const faceZone& pp = mfz[iter.key()];
forAll(pp, i)
const label fzi = iter.key();
const faceZone& fz = mfz[fzi];
forAll(fz, i)
{
faceLabels.append(pp[i]);
compactZones.append(faceZoneToCompactZone[pp.index()]);
faceLabels.append(fz[i]);
compactZones.append(faceZoneToCompactZone[fzi]);
}
}
}

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
@ -189,7 +189,7 @@ void Foam::PtrList<T>::shrink()
if (j != this->size())
{
setSize(j);
this->ptrs_.setSize(j);
}
}

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,7 +47,7 @@ inline void Foam::PtrList<T>::append(T* ptr)
template<class T>
inline void Foam::PtrList<T>::append(const autoPtr<T>& aptr)
{
return append(const_cast<autoPtr<T>&>(aptr).ptr());
append(const_cast<autoPtr<T>&>(aptr).ptr());
}
@ -57,7 +57,7 @@ inline void Foam::PtrList<T>::append
const tmp<T>& t
)
{
return append(const_cast<tmp<T>&>(t).ptr());
append(const_cast<tmp<T>&>(t).ptr());
}

View File

@ -106,7 +106,6 @@ bool Foam::MeshZones<ZoneType, MeshType>::read()
(
patchEntries[zi].keyword(),
patchEntries[zi].dict(),
zi,
*this
)
);
@ -397,7 +396,6 @@ void Foam::MeshZones<ZoneType, MeshType>::append
(
zoneName,
cells,
zoneID,
*this
)
);

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,11 +48,10 @@ Foam::cellZone::cellZone
(
const word& name,
const labelUList& addr,
const label index,
const meshCellZones& mz
)
:
zone(name, addr, index),
zone(name, addr),
meshZones_(mz)
{}
@ -61,11 +60,10 @@ Foam::cellZone::cellZone
(
const word& name,
labelList&& addr,
const label index,
const meshCellZones& mz
)
:
zone(name, move(addr), index),
zone(name, move(addr)),
meshZones_(mz)
{}
@ -74,11 +72,10 @@ Foam::cellZone::cellZone
(
const word& name,
const dictionary& dict,
const label index,
const meshCellZones& mz
)
:
zone(name, dict, this->labelsName, index),
zone(name, dict, this->labelsName),
meshZones_(mz)
{}
@ -87,11 +84,10 @@ Foam::cellZone::cellZone
(
const cellZone& cz,
const labelUList& addr,
const label index,
const meshCellZones& mz
)
:
zone(cz, addr, index),
zone(cz, addr),
meshZones_(mz)
{}
@ -100,11 +96,10 @@ Foam::cellZone::cellZone
(
const cellZone& cz,
labelList&& addr,
const label index,
const meshCellZones& mz
)
:
zone(cz, move(addr), index),
zone(cz, move(addr)),
meshZones_(mz)
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -94,10 +94,9 @@ public:
(
const word& name,
const dictionary& dict,
const label index,
const meshCellZones& mz
),
(name, dict, index, mz)
(name, dict, mz)
);
@ -108,7 +107,6 @@ public:
(
const word& name,
const labelUList& addr,
const label index,
const meshCellZones&
);
@ -117,7 +115,6 @@ public:
(
const word& name,
labelList&& addr,
const label index,
const meshCellZones&
);
@ -126,7 +123,6 @@ public:
(
const word& name,
const dictionary&,
const label index,
const meshCellZones&
);
@ -136,7 +132,6 @@ public:
(
const cellZone&,
const labelUList& addr,
const label index,
const meshCellZones&
);
@ -146,7 +141,6 @@ public:
(
const cellZone&,
labelList&& addr,
const label index,
const meshCellZones&
);
@ -159,7 +153,7 @@ public:
{
return autoPtr<cellZone>
(
new cellZone(*this, *this, index(), mz)
new cellZone(*this, *this, mz)
);
}
@ -168,13 +162,12 @@ public:
virtual autoPtr<cellZone> clone
(
const labelUList& addr,
const label index,
const meshCellZones& mz
) const
{
return autoPtr<cellZone>
(
new cellZone(*this, addr, index, mz)
new cellZone(*this, addr, mz)
);
}
@ -187,7 +180,6 @@ public:
(
const word& name,
const dictionary&,
const label index,
const meshCellZones&
);

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,6 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
(
const word& name,
const dictionary& dict,
const label index,
const meshCellZones& mz
)
{
@ -58,7 +57,7 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
<< exit(FatalIOError);
}
return autoPtr<cellZone>(cstrIter()(name, dict, index, mz));
return autoPtr<cellZone>(cstrIter()(name, dict, mz));
}

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
@ -189,11 +189,10 @@ Foam::faceZone::faceZone
const word& name,
const labelUList& addr,
const boolList& fm,
const label index,
const meshFaceZones& mz
)
:
zone(name, addr, index),
zone(name, addr),
flipMap_(fm),
meshZones_(mz),
patchPtr_(nullptr),
@ -210,11 +209,10 @@ Foam::faceZone::faceZone
const word& name,
labelList&& addr,
boolList&& fm,
const label index,
const meshFaceZones& mz
)
:
zone(name, move(addr), index),
zone(name, move(addr)),
flipMap_(move(fm)),
meshZones_(mz),
patchPtr_(nullptr),
@ -230,11 +228,10 @@ Foam::faceZone::faceZone
(
const word& name,
const dictionary& dict,
const label index,
const meshFaceZones& mz
)
:
zone(name, dict, this->labelsName, index),
zone(name, dict, this->labelsName),
flipMap_(dict.lookup("flipMap")),
meshZones_(mz),
patchPtr_(nullptr),
@ -251,11 +248,10 @@ Foam::faceZone::faceZone
const faceZone& fz,
const labelUList& addr,
const boolList& fm,
const label index,
const meshFaceZones& mz
)
:
zone(fz, addr, index),
zone(fz, addr),
flipMap_(fm),
meshZones_(mz),
patchPtr_(nullptr),
@ -272,11 +268,10 @@ Foam::faceZone::faceZone
const faceZone& fz,
labelList&& addr,
boolList&& fm,
const label index,
const meshFaceZones& mz
)
:
zone(fz, move(addr), index),
zone(fz, move(addr)),
flipMap_(move(fm)),
meshZones_(mz),
patchPtr_(nullptr),
@ -474,8 +469,7 @@ bool Foam::faceZone::checkParallelSync(const bool report) const
if (report)
{
Pout<< " ***Problem with faceZone " << index()
<< " named " << name()
Pout<< " ***Problem with faceZone " << name()
<< ". Face " << facei
<< " on coupled patch "
<< bm[patchi].name()
@ -495,8 +489,7 @@ bool Foam::faceZone::checkParallelSync(const bool report) const
if (report)
{
Pout<< " ***Problem with faceZone " << index()
<< " named " << name()
Pout<< " ***Problem with faceZone " << name()
<< ". Face " << facei
<< " on coupled patch "
<< bm[patchi].name()

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
@ -137,10 +137,9 @@ public:
(
const word& name,
const dictionary& dict,
const label index,
const meshFaceZones& mz
),
(name, dict, index, mz)
(name, dict, mz)
);
@ -152,7 +151,6 @@ public:
const word& name,
const labelUList& addr,
const boolList& fm,
const label index,
const meshFaceZones& mz
);
@ -162,7 +160,6 @@ public:
const word& name,
labelList&& addr,
boolList&& fm,
const label index,
const meshFaceZones&
);
@ -171,7 +168,6 @@ public:
(
const word& name,
const dictionary&,
const label index,
const meshFaceZones&
);
@ -182,7 +178,6 @@ public:
const faceZone&,
const labelUList& addr,
const boolList& fm,
const label index,
const meshFaceZones&
);
@ -193,7 +188,6 @@ public:
const faceZone&,
labelList&& addr,
boolList&& fm,
const label index,
const meshFaceZones&
);
@ -206,7 +200,7 @@ public:
{
return autoPtr<faceZone>
(
new faceZone(*this, *this, flipMap(), index(), mz)
new faceZone(*this, *this, flipMap(), mz)
);
}
@ -216,13 +210,12 @@ public:
(
const labelUList& addr,
const boolList& fm,
const label index,
const meshFaceZones& mz
) const
{
return autoPtr<faceZone>
(
new faceZone(*this, addr, fm, index, mz)
new faceZone(*this, addr, fm, mz)
);
}
@ -235,7 +228,6 @@ public:
(
const word& name,
const dictionary&,
const label index,
const meshFaceZones&
);

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,6 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
(
const word& name,
const dictionary& dict,
const label index,
const meshFaceZones& mz
)
{
@ -58,7 +57,7 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
<< exit(FatalIOError);
}
return autoPtr<faceZone>(cstrIter()(name, dict, index, mz));
return autoPtr<faceZone>(cstrIter()(name, dict, mz));
}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,11 +48,10 @@ Foam::pointZone::pointZone
(
const word& name,
const labelUList& addr,
const label index,
const meshPointZones& mz
)
:
zone(name, addr, index),
zone(name, addr),
meshZones_(mz)
{}
@ -61,11 +60,10 @@ Foam::pointZone::pointZone
(
const word& name,
labelList&& addr,
const label index,
const meshPointZones& mz
)
:
zone(name, move(addr), index),
zone(name, move(addr)),
meshZones_(mz)
{}
@ -74,11 +72,10 @@ Foam::pointZone::pointZone
(
const word& name,
const dictionary& dict,
const label index,
const meshPointZones& mz
)
:
zone(name, dict, this->labelsName, index),
zone(name, dict, this->labelsName),
meshZones_(mz)
{}
@ -87,11 +84,10 @@ Foam::pointZone::pointZone
(
const pointZone& pz,
const labelUList& addr,
const label index,
const meshPointZones& mz
)
:
zone(pz, addr, index),
zone(pz, addr),
meshZones_(mz)
{}
@ -100,11 +96,10 @@ Foam::pointZone::pointZone
(
const pointZone& pz,
labelList&& addr,
const label index,
const meshPointZones& mz
)
:
zone(pz, move(addr), index),
zone(pz, move(addr)),
meshZones_(mz)
{}
@ -139,13 +134,15 @@ bool Foam::pointZone::checkParallelSync(const bool report) const
{
const polyMesh& mesh = meshZones().mesh();
const label index = meshZones_.findIndex(name());
labelList maxZone(mesh.nPoints(), -1);
labelList minZone(mesh.nPoints(), labelMax);
forAll(*this, i)
{
label pointi = operator[](i);
maxZone[pointi] = index();
minZone[pointi] = index();
const label pointi = operator[](i);
maxZone[pointi] = index;
minZone[pointi] = index;
}
syncTools::syncPointList(mesh, maxZone, maxEqOp<label>(), label(-1));
syncTools::syncPointList(mesh, minZone, minEqOp<label>(), labelMax);
@ -166,8 +163,7 @@ bool Foam::pointZone::checkParallelSync(const bool report) const
{
if (report && !error)
{
Info<< " ***Problem with pointZone " << index()
<< " named " << name()
Info<< " ***Problem with pointZone " << name()
<< ". Point " << pointi
<< " at " << mesh.points()[pointi]
<< " is in zone "

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,10 +95,9 @@ public:
(
const word& name,
const dictionary& dict,
const label index,
const meshPointZones& mz
),
(name, dict, index, mz)
(name, dict, mz)
);
@ -109,7 +108,6 @@ public:
(
const word& name,
const labelUList& addr,
const label index,
const meshPointZones&
);
@ -118,7 +116,6 @@ public:
(
const word& name,
labelList&& addr,
const label index,
const meshPointZones&
);
@ -127,7 +124,6 @@ public:
(
const word& name,
const dictionary&,
const label index,
const meshPointZones&
);
@ -137,7 +133,6 @@ public:
(
const pointZone&,
const labelUList& addr,
const label index,
const meshPointZones&
);
@ -147,7 +142,6 @@ public:
(
const pointZone&,
labelList&& addr,
const label index,
const meshPointZones&
);
@ -160,7 +154,7 @@ public:
{
return autoPtr<pointZone>
(
new pointZone(*this, *this, index(), mz)
new pointZone(*this, *this, mz)
);
}
@ -169,13 +163,12 @@ public:
virtual autoPtr<pointZone> clone
(
const meshPointZones& mz,
const label index,
const labelUList& addr
) const
{
return autoPtr<pointZone>
(
new pointZone(*this, addr, index, mz)
new pointZone(*this, addr, mz)
);
}
@ -188,7 +181,6 @@ public:
(
const word& name,
const dictionary&,
const label index,
const meshPointZones&
);

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,6 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
(
const word& name,
const dictionary& dict,
const label index,
const meshPointZones& mz
)
{
@ -58,7 +57,7 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
<< exit(FatalIOError);
}
return autoPtr<pointZone>(cstrIter()(name, dict, index, mz));
return autoPtr<pointZone>(cstrIter()(name, dict, mz));
}

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,13 +85,11 @@ void Foam::zone::calcLookupMap() const
Foam::zone::zone
(
const word& name,
const labelUList& addr,
const label index
const labelUList& addr
)
:
labelList(addr),
name_(name),
index_(index),
lookupMapPtr_(nullptr)
{}
@ -99,13 +97,11 @@ Foam::zone::zone
Foam::zone::zone
(
const word& name,
labelList&& addr,
const label index
labelList&& addr
)
:
labelList(move(addr)),
name_(name),
index_(index),
lookupMapPtr_(nullptr)
{}
@ -114,13 +110,11 @@ Foam::zone::zone
(
const word& name,
const dictionary& dict,
const word& labelsName,
const label index
const word& labelsName
)
:
labelList(dict.lookup(labelsName)),
name_(name),
index_(index),
lookupMapPtr_(nullptr)
{}
@ -128,13 +122,11 @@ Foam::zone::zone
Foam::zone::zone
(
const zone& z,
const labelUList& addr,
const label index
const labelUList& addr
)
:
labelList(addr),
name_(z.name()),
index_(index),
lookupMapPtr_(nullptr)
{}
@ -142,13 +134,11 @@ Foam::zone::zone
Foam::zone::zone
(
const zone& z,
labelList&& addr,
const label index
labelList&& addr
)
:
labelList(move(addr)),
name_(z.name()),
index_(index),
lookupMapPtr_(nullptr)
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,9 +67,6 @@ protected:
//- Name of zone
word name_;
//- Index of zone
label index_;
// Demand-driven private data
@ -95,16 +92,14 @@ public:
zone
(
const word& name,
const labelUList& addr,
const label index
const labelUList& addr
);
//- Construct from components, moving contents
zone
(
const word& name,
labelList&& addr,
const label index
labelList&& addr
);
//- Construct from dictionary
@ -112,8 +107,7 @@ public:
(
const word& name,
const dictionary&,
const word& labelsName,
const label index
const word& labelsName
);
//- Construct given the original zone and resetting the
@ -121,8 +115,7 @@ public:
zone
(
const zone&,
const labelUList& addr,
const label index
const labelUList& addr
);
//- Construct given the original zone, resetting the
@ -130,8 +123,7 @@ public:
zone
(
const zone&,
labelList&& addr,
const label index
labelList&& addr
);
//- Disallow default bitwise copy construction
@ -155,12 +147,6 @@ public:
// the item is not in the zone, returns -1
label localID(const label globalID) const;
//- Return the index of this zone in zone list
label index() const
{
return index_;
}
//- Return a reference to the look-up map
const Map<label>& lookupMap() const;

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-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -105,7 +105,6 @@ void Foam::meshReader::addFaceZones(polyMesh& mesh) const
iter.key(),
iter(),
List<bool>(iter().size(), false),
nZone,
mesh.faceZones()
)
);

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
@ -495,7 +495,6 @@ void Foam::cellTable::addCellZones
(
zoneNames[origZoneI],
zoneCells[origZoneI],
zoneI,
czMesh
)
);

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
@ -310,7 +310,6 @@ void Foam::singleCellFvMesh::agglomerateMesh
oldFz.clone
(
newAddressing,
zoneI,
cellZones()
)
);
@ -345,7 +344,6 @@ void Foam::singleCellFvMesh::agglomerateMesh
(
newAddressing,
newFlipMap,
zoneI,
faceZones()
)
);
@ -377,7 +375,6 @@ void Foam::singleCellFvMesh::agglomerateMesh
oldFz.clone
(
pointZones(),
zoneI,
newAddressing
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -363,7 +363,6 @@ Foam::labelList Foam::surfaceZonesInfo::addCellZonesToMesh
(
cellZoneName, // name
labelList(0), // addressing
zonei, // index
cellZones // meshCellZones
)
);
@ -427,7 +426,6 @@ Foam::labelList Foam::surfaceZonesInfo::addFaceZonesToMesh
faceZoneName, // name
labelList(0), // addressing
boolList(0), // flipmap
zonei, // index
faceZones // meshFaceZones
)
);

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
@ -274,7 +274,6 @@ bool cellZoneSet::writeObject
(
name(),
addressing_,
zoneID,
cellZones
)
);

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
@ -490,7 +490,6 @@ bool faceZoneSet::writeObject
name(),
addressing_,
flipMap_,
zoneID,
faceZones
)
);

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
@ -275,7 +275,6 @@ bool pointZoneSet::writeObject
(
name(),
addressing_,
zoneID,
pointZones
)
);

View File

@ -983,7 +983,6 @@ void Foam::domainDecomposition::decompose()
pz[zoneI].clone
(
procMesh.pointZones(),
zoneI,
zonePoints[zoneI].shrink()
)
);
@ -1077,7 +1076,6 @@ void Foam::domainDecomposition::decompose()
(
zoneFaces[zoneI].shrink(), // addressing
zoneFaceFlips[zoneI].shrink(), // flipmap
zoneI,
procMesh.faceZones()
)
);
@ -1141,7 +1139,6 @@ void Foam::domainDecomposition::decompose()
cz[zoneI].clone
(
zoneCells[zoneI].shrink(),
zoneI,
procMesh.cellZones()
)
);

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
@ -1749,7 +1749,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
(
pointZoneNames[i],
zonePoints[i],
i,
domainMesh.pointZones()
);
}
@ -1762,7 +1761,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
faceZoneNames[i],
zoneFaces[i],
zoneFaceFlip[i],
i,
domainMesh.faceZones()
);
}
@ -1774,7 +1772,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
(
cellZoneNames[i],
zoneCells[i],
i,
domainMesh.cellZones()
);
}

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
@ -337,7 +337,6 @@ void Foam::fvMeshSubset::subsetZones()
(
pz.name(),
subset(baseMesh().nPoints(), pz, pointMap()),
i,
fvMeshSubsetPtr_().pointZones()
);
}
@ -405,7 +404,6 @@ void Foam::fvMeshSubset::subsetZones()
fz.name(),
subAddressing,
subFlipStatus,
i,
fvMeshSubsetPtr_().faceZones()
);
}
@ -423,7 +421,6 @@ void Foam::fvMeshSubset::subsetZones()
(
cz.name(),
subset(baseMesh().nCells(), cz, cellMap()),
i,
fvMeshSubsetPtr_().cellZones()
);
}

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
@ -1109,7 +1109,6 @@ void Foam::polyMeshAdder::addZones
(
pointZoneNames[i],
pzPoints[i],
i,
mesh.pointZones()
);
}
@ -1122,7 +1121,6 @@ void Foam::polyMeshAdder::addZones
faceZoneNames[i],
fzFaces[i],
fzFlips[i],
i,
mesh.faceZones()
);
}
@ -1134,7 +1132,6 @@ void Foam::polyMeshAdder::addZones
(
cellZoneNames[i],
czCells[i],
i,
mesh.cellZones()
);
}

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
@ -3380,7 +3380,6 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
(
oldPointZones[i].name(),
labelList(0),
i,
newMesh.pointZones()
);
}
@ -3396,7 +3395,6 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
oldFaceZones[i].name(),
labelList(0),
boolList(0),
i,
newMesh.faceZones()
);
}
@ -3411,7 +3409,6 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
(
oldCellZones[i].name(),
labelList(0),
i,
newMesh.cellZones()
);
}