Renamed cellZones -> cellZoneList, faceZones -> faceZoneList, pointZones -> pointZoneList

to allow the names cellZones, faceZones and pointZones to be used for the
namespaces for run-time selectable zones.
This commit is contained in:
Henry Weller
2024-04-02 17:00:51 +01:00
parent acd2708db5
commit 929952727c
48 changed files with 207 additions and 193 deletions

View File

@ -198,7 +198,7 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
const pointField& p = m.points();
labelList renumberPoints(p.size());
const pointZones& pz = m.pointZones();
const pointZoneList& pz = m.pointZones();
labelList pointZoneIndices(pz.size());
forAll(pz, zonei)
@ -229,7 +229,7 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
const cellList& c = m.cells();
labelList renumberCells(c.size());
const cellZones& cz = m.cellZones();
const cellZoneList& cz = m.cellZones();
labelList cellZoneIndices(cz.size());
forAll(cz, zonei)
@ -267,7 +267,7 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
const faceZones& fz = m.faceZones();
const faceZoneList& fz = m.faceZones();
labelList faceZoneIndices(fz.size());
forAll(fz, zonei)

View File

@ -238,7 +238,7 @@ void simpleMarkFeatures
}
// B. face zones.
const faceZones& faceZones = mesh.faceZones();
const faceZoneList& faceZones = mesh.faceZones();
if (doNotPreserveFaceZones)
{

View File

@ -1122,7 +1122,7 @@ label findCorrespondingRegion
void getZoneID
(
const polyMesh& mesh,
const cellZones& cellZones,
const cellZoneList& cellZones,
labelList& zoneID,
labelList& neiZoneID
)
@ -1181,7 +1181,7 @@ void matchRegions
labelList& zoneToRegion
)
{
const cellZones& cellZones = mesh.cellZones();
const cellZoneList& cellZones = mesh.cellZones();
regionToZone.setSize(nCellRegions, -1);
regionNames.setSize(nCellRegions);
@ -1513,7 +1513,7 @@ int main(int argc, char *argv[])
args.optionLookupOrDefault("defaultRegionName", standardRegionName)
);
const Foam::cellZones& cellZones = mesh.cellZones();
const cellZoneList& cellZones = mesh.cellZones();
// Existing zoneID
labelList zoneID(mesh.nCells(), -1);
@ -1528,10 +1528,13 @@ int main(int argc, char *argv[])
// cellRegion is the labelList with the region per cell.
labelList cellRegion;
// Region per zone
labelList regionToZone;
// Name of region
wordList regionNames;
// Zone to region
labelList zoneToRegion;
@ -1572,7 +1575,7 @@ int main(int argc, char *argv[])
<< "This requires all"
<< " cells to be in one and only one cellZone." << nl << endl;
Foam::cellZones newCellZones
cellZoneList newCellZones
(
IOobject
(

View File

@ -122,7 +122,7 @@ void removeSet
{
removeZone
(
const_cast<cellZones&>(mesh.cellZones()),
const_cast<cellZoneList&>(mesh.cellZones()),
setName
);
}
@ -130,7 +130,7 @@ void removeSet
{
removeZone
(
const_cast<faceZones&>(mesh.faceZones()),
const_cast<faceZoneList&>(mesh.faceZones()),
setName
);
}
@ -138,7 +138,7 @@ void removeSet
{
removeZone
(
const_cast<pointZones&>(mesh.pointZones()),
const_cast<pointZoneList&>(mesh.pointZones()),
setName
);
}

View File

@ -1062,7 +1062,7 @@ int main(int argc, char *argv[])
//
//---------------------------------------------------------------------
const faceZones& zones = mesh.faceZones();
const faceZoneList& zones = mesh.faceZones();
if (doFaceZones && zones.size() > 0)
{

View File

@ -144,7 +144,7 @@ Usage
#include "sphericalTensorIOField.H"
#include "symmTensorIOField.H"
#include "tensorIOField.H"
#include "faceZones.H"
#include "faceZoneList.H"
#include "Cloud.H"
#include "passiveParticle.H"
#include "stringListOps.H"
@ -1074,7 +1074,7 @@ int main(int argc, char *argv[])
);
print(" surfVectorFields :", Info, svf);
const faceZones& zones = mesh.faceZones();
const faceZoneList& zones = mesh.faceZones();
forAll(zones, zoneI)
{

View File

@ -366,7 +366,7 @@ class vtkPVFoam
template<class ZoneType, class ZonesType>
wordList getZoneNames
(
const Zones<ZoneType, ZonesType, polyMesh>&
const ZoneList<ZoneType, ZonesType, polyMesh>&
) const;
//- Add objects of Type to paraview array selection

View File

@ -264,7 +264,7 @@ void Foam::vtkPVFoam::convertMeshCellZones
printMemory();
}
const cellZones& zMesh = mesh.cellZones();
const cellZoneList& zMesh = mesh.cellZones();
for (int partId = range.start(); partId < range.end(); ++partId)
{
const word zoneName = getPartName(partId);
@ -432,7 +432,7 @@ void Foam::vtkPVFoam::convertMeshFaceZones
printMemory();
}
const faceZones& zMesh = mesh.faceZones();
const faceZoneList& zMesh = mesh.faceZones();
for (int partId = range.start(); partId < range.end(); ++partId)
{
const word zoneName = getPartName(partId);
@ -550,7 +550,7 @@ void Foam::vtkPVFoam::convertMeshPointZones
if (range.size())
{
const pointZones& zMesh = mesh.pointZones();
const pointZoneList& zMesh = mesh.pointZones();
for (int partId = range.start(); partId < range.end(); ++partId)
{
word zoneName = getPartName(partId);

View File

@ -260,7 +260,7 @@ void Foam::vtkPVFoam::convertSurfaceFields
continue;
}
const faceZones& zMesh = mesh.faceZones();
const faceZoneList& zMesh = mesh.faceZones();
const label zoneId = zMesh.findIndex(zoneName);
if (zoneId < 0)

View File

@ -84,7 +84,7 @@ public:
template<class ZoneType, class ZonesType>
Foam::wordList Foam::vtkPVFoam::getZoneNames
(
const Zones<ZoneType, ZonesType, polyMesh>& zmesh
const ZoneList<ZoneType, ZonesType, polyMesh>& zmesh
) const
{
wordList names(zmesh.size());

View File

@ -217,7 +217,7 @@ void Foam::vtkPVFoam::convertVolFields
continue;
}
const faceZones& zMesh = mesh.faceZones();
const faceZoneList& zMesh = mesh.faceZones();
const label zoneId = zMesh.findIndex(zoneName);
if (zoneId < 0)

View File

@ -142,7 +142,7 @@ int main(int argc, char *argv[])
const faceZones& mfz = mesh.faceZones();
const faceZoneList& mfz = mesh.faceZones();
labelHashSet includeFaceZones(mfz.size());
if (args.optionFound("faceZones"))

View File

@ -474,7 +474,7 @@ meshes/meshObjects/meshObjects.C
meshes/zones/pointZones/pointZone.C
meshes/zones/cellZones/cellZone.C
meshes/zones/faceZones/faceZone.C
meshes/zones/faceZones/faceZones.C
meshes/zones/faceZones/faceZoneList.C
polyMesh = meshes/polyMesh

View File

@ -52,9 +52,9 @@ SourceFiles
#include "labelIOList.H"
#include "polyBoundaryMesh.H"
#include "boundBox.H"
#include "pointZones.H"
#include "faceZones.H"
#include "cellZones.H"
#include "pointZoneList.H"
#include "faceZoneList.H"
#include "cellZoneList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -159,13 +159,13 @@ private:
// Zoning information
//- Point zones
Foam::pointZones pointZones_;
pointZoneList pointZones_;
//- Face zones
Foam::faceZones faceZones_;
faceZoneList faceZones_;
//- Cell zones
Foam::cellZones cellZones_;
cellZoneList cellZones_;
//- Parallel info
@ -438,19 +438,19 @@ public:
const indexedOctree<treeDataCell>& cellTree() const;
//- Return point zones
const Foam::pointZones& pointZones() const
const pointZoneList& pointZones() const
{
return pointZones_;
}
//- Return face zones
const Foam::faceZones& faceZones() const
const faceZoneList& faceZones() const
{
return faceZones_;
}
//- Return cell zones
const Foam::cellZones& cellZones() const
const cellZoneList& cellZones() const
{
return cellZones_;
}
@ -506,19 +506,19 @@ public:
// Topological change
//- Return non-const access to the pointZones
Foam::pointZones& pointZones()
pointZoneList& pointZones()
{
return pointZones_;
}
//- Return non-const access to the faceZones
Foam::faceZones& faceZones()
faceZoneList& faceZones()
{
return faceZones_;
}
//- Return non-const access to the cellZones
Foam::cellZones& cellZones()
cellZoneList& cellZones()
{
return cellZones_;
}

View File

@ -308,7 +308,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
// pointZones
{
Foam::pointZones newPointZones
pointZoneList newPointZones
(
IOobject
(
@ -329,7 +329,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
// faceZones
{
Foam::faceZones newFaceZones
faceZoneList newFaceZones
(
IOobject
(
@ -350,7 +350,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
// cellZones
{
Foam::cellZones newCellZones
cellZoneList newCellZones
(
IOobject
(

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/
#include "Zones.H"
#include "ZoneList.H"
#include "Pstream.H"
#include "demandDrivenData.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class ZoneType, class ZonesType, class MeshType>
bool Foam::Zones<ZoneType, ZonesType, MeshType>::read()
bool Foam::ZoneList<ZoneType, ZonesType, MeshType>::read()
{
if
(
@ -73,7 +73,7 @@ bool Foam::Zones<ZoneType, ZonesType, MeshType>::read()
// Check state of IOstream
is.check
(
"Zones::Zones"
"ZoneList::ZoneList"
"(const IOobject&, const MeshType&)"
);
@ -92,7 +92,7 @@ bool Foam::Zones<ZoneType, ZonesType, MeshType>::read()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ZoneType, class ZonesType, class MeshType>
Foam::Zones<ZoneType, ZonesType, MeshType>::Zones
Foam::ZoneList<ZoneType, ZonesType, MeshType>::ZoneList
(
const IOobject& io,
const MeshType& mesh
@ -107,7 +107,7 @@ Foam::Zones<ZoneType, ZonesType, MeshType>::Zones
template<class ZoneType, class ZonesType, class MeshType>
Foam::Zones<ZoneType, ZonesType, MeshType>::Zones
Foam::ZoneList<ZoneType, ZonesType, MeshType>::ZoneList
(
const IOobject& io,
const MeshType& mesh,
@ -124,7 +124,7 @@ Foam::Zones<ZoneType, ZonesType, MeshType>::Zones
template<class ZoneType, class ZonesType, class MeshType>
Foam::Zones<ZoneType, ZonesType, MeshType>::Zones
Foam::ZoneList<ZoneType, ZonesType, MeshType>::ZoneList
(
const IOobject& io,
const MeshType& mesh,
@ -159,7 +159,7 @@ Foam::Zones<ZoneType, ZonesType, MeshType>::Zones
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ZoneType, class ZonesType, class MeshType>
Foam::Zones<ZoneType, ZonesType, MeshType>::~Zones()
Foam::ZoneList<ZoneType, ZonesType, MeshType>::~ZoneList()
{
clearAddressing();
}
@ -168,7 +168,7 @@ Foam::Zones<ZoneType, ZonesType, MeshType>::~Zones()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ZoneType, class ZonesType, class MeshType>
bool Foam::Zones<ZoneType, ZonesType, MeshType>::found
bool Foam::ZoneList<ZoneType, ZonesType, MeshType>::found
(
const label objectIndex
) const
@ -186,7 +186,7 @@ bool Foam::Zones<ZoneType, ZonesType, MeshType>::found
template<class ZoneType, class ZonesType, class MeshType>
Foam::labelList Foam::Zones<ZoneType, ZonesType, MeshType>::whichZones
Foam::labelList Foam::ZoneList<ZoneType, ZonesType, MeshType>::whichZones
(
const label objectIndex
) const
@ -206,7 +206,7 @@ Foam::labelList Foam::Zones<ZoneType, ZonesType, MeshType>::whichZones
template<class ZoneType, class ZonesType, class MeshType>
Foam::wordList Foam::Zones<ZoneType, ZonesType, MeshType>::types() const
Foam::wordList Foam::ZoneList<ZoneType, ZonesType, MeshType>::types() const
{
const PtrListDictionary<ZoneType>& zones = *this;
@ -222,10 +222,13 @@ Foam::wordList Foam::Zones<ZoneType, ZonesType, MeshType>::types() const
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::append(ZoneType* zonePtr) const
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::append
(
ZoneType* zonePtr
) const
{
Zones<ZoneType, ZonesType, MeshType>& zones =
const_cast<Zones<ZoneType, ZonesType, MeshType>&>(*this);
ZoneList<ZoneType, ZonesType, MeshType>& zones =
const_cast<ZoneList<ZoneType, ZonesType, MeshType>&>(*this);
if (found(zonePtr->name()))
{
@ -244,13 +247,13 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::append(ZoneType* zonePtr) const
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::append
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::append
(
const ZoneType& zone
) const
{
Zones<ZoneType, ZonesType, MeshType>& zones =
const_cast<Zones<ZoneType, ZonesType, MeshType>&>(*this);
ZoneList<ZoneType, ZonesType, MeshType>& zones =
const_cast<ZoneList<ZoneType, ZonesType, MeshType>&>(*this);
if (found(zone.name()))
{
@ -268,7 +271,7 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::append
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::clearAddressing()
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::clearAddressing()
{
PtrListDictionary<ZoneType>& zones = *this;
@ -280,7 +283,7 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::clearAddressing()
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::clear()
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::clear()
{
clearAddressing();
PtrListDictionary<ZoneType>::clear();
@ -288,7 +291,7 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::clear()
template<class ZoneType, class ZonesType, class MeshType>
bool Foam::Zones<ZoneType, ZonesType, MeshType>::checkDefinition
bool Foam::ZoneList<ZoneType, ZonesType, MeshType>::checkDefinition
(
const bool report
) const
@ -306,7 +309,7 @@ bool Foam::Zones<ZoneType, ZonesType, MeshType>::checkDefinition
template<class ZoneType, class ZonesType, class MeshType>
bool Foam::Zones<ZoneType, ZonesType, MeshType>::checkParallelSync
bool Foam::ZoneList<ZoneType, ZonesType, MeshType>::checkParallelSync
(
const bool report
) const
@ -384,7 +387,7 @@ bool Foam::Zones<ZoneType, ZonesType, MeshType>::checkParallelSync
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::insert
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::insert
(
const List<labelHashSet>& zonesIndices
)
@ -407,7 +410,10 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::insert
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::movePoints(const pointField& p)
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::movePoints
(
const pointField& p
)
{
PtrListDictionary<ZoneType>& zones = *this;
@ -419,7 +425,7 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::movePoints(const pointField& p)
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::topoChange
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::topoChange
(
const polyTopoChangeMap& map
)
@ -434,7 +440,10 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::topoChange
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::mapMesh(const polyMeshMap& map)
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::mapMesh
(
const polyMeshMap& map
)
{
PtrListDictionary<ZoneType>& zones = *this;
@ -446,7 +455,7 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::mapMesh(const polyMeshMap& map)
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::distribute
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::distribute
(
const polyDistributionMap& map
)
@ -461,7 +470,7 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::distribute
template<class ZoneType, class ZonesType, class MeshType>
void Foam::Zones<ZoneType, ZonesType, MeshType>::swap(ZonesType& otherZones)
void Foam::ZoneList<ZoneType, ZonesType, MeshType>::swap(ZonesType& otherZones)
{
clearAddressing();
otherZones.clearAddressing();
@ -518,7 +527,7 @@ void Foam::Zones<ZoneType, ZonesType, MeshType>::swap(ZonesType& otherZones)
template<class ZoneType, class ZonesType, class MeshType>
bool Foam::Zones<ZoneType, ZonesType, MeshType>::writeData(Ostream& os) const
bool Foam::ZoneList<ZoneType, ZonesType, MeshType>::writeData(Ostream& os) const
{
os << *this;
return os.good();
@ -531,7 +540,7 @@ template<class ZoneType, class ZonesType, class MeshType>
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const Zones<ZoneType, ZonesType, MeshType>& zones
const ZoneList<ZoneType, ZonesType, MeshType>& zones
)
{
os << zones.size() << nl << token::BEGIN_LIST;

View File

@ -22,18 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::Zones
Foam::ZoneList
Description
A list of mesh zones.
SourceFiles
Zones.C
ZoneList.C
\*---------------------------------------------------------------------------*/
#ifndef Zones_H
#define Zones_H
#ifndef ZoneList_H
#define ZoneList_H
#include "PtrListDictionary.H"
#include "regIOobject.H"
@ -55,17 +55,17 @@ class polyTopoChangeMap;
class polyMeshMap;
class polyDistributionMap;
template<class ZoneType, class ZonesType, class MeshType> class Zones;
template<class ZoneType, class ZonesType, class MeshType> class ZoneList;
template<class ZoneType, class ZonesType, class MeshType>
Ostream& operator<<(Ostream&, const Zones<ZoneType, ZonesType, MeshType>&);
Ostream& operator<<(Ostream&, const ZoneList<ZoneType, ZonesType, MeshType>&);
/*---------------------------------------------------------------------------*\
Class Zones Declaration
Class ZoneList Declaration
\*---------------------------------------------------------------------------*/
template<class ZoneType, class ZonesType, class MeshType>
class Zones
class ZoneList
:
public regIOobject,
public PtrListDictionary<ZoneType>
@ -87,14 +87,14 @@ public:
// Constructors
//- Read constructor given IOobject and a MeshType reference
Zones
ZoneList
(
const IOobject&,
const MeshType&
);
//- Read constructor if file present otherwise from size
Zones
ZoneList
(
const IOobject&,
const MeshType&,
@ -102,7 +102,7 @@ public:
);
//- Construct given a PtrList
Zones
ZoneList
(
const IOobject&,
const MeshType&,
@ -110,14 +110,14 @@ public:
);
//- Move constructor
Zones(Zones&&) = default;
ZoneList(ZoneList&&) = default;
//- Disallow default bitwise copy construction
Zones(const Zones&) = delete;
ZoneList(const ZoneList&) = delete;
//- Destructor
~Zones();
~ZoneList();
// Member Functions
@ -187,7 +187,7 @@ public:
using PtrListDictionary<ZoneType>::operator[];
//- Disallow default bitwise assignment
void operator=(const Zones<ZoneType, ZonesType, MeshType>&) = delete;
void operator=(const ZoneList<ZoneType, ZonesType, MeshType>&) = delete;
// Ostream operator
@ -195,7 +195,7 @@ public:
friend Ostream& operator<< <ZoneType, ZonesType, MeshType>
(
Ostream&,
const Zones<ZoneType, ZonesType, MeshType>&
const ZoneList<ZoneType, ZonesType, MeshType>&
);
};
@ -207,7 +207,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "Zones.C"
#include "ZoneList.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "cellZone.H"
#include "cellZones.H"
#include "cellZoneList.H"
#include "polyMesh.H"
#include "polyTopoChangeMap.H"
#include "addToRunTimeSelectionTable.H"
@ -33,7 +33,7 @@ License
namespace Foam
{
typedef Zone<cellZone, cellZones> cellZoneType;
typedef Zone<cellZone, cellZoneList> cellZoneType;
defineTemplateRunTimeSelectionTable(cellZoneType, dictionary);
defineTypeNameAndDebug(cellZone, 0);

View File

@ -29,7 +29,7 @@ Description
Currently set up as an indirect list but will be extended to use a
primitive mesh. For quick check whether a cell belongs to the zone use
the lookup mechanism in cellZones, where all the zoned cells are
the lookup mechanism in cellZoneList, where all the zoned cells are
registered with their zone number.
SourceFiles
@ -47,7 +47,7 @@ SourceFiles
namespace Foam
{
class cellZones;
class cellZoneList;
/*---------------------------------------------------------------------------*\
Class cellZone Declaration
@ -55,7 +55,7 @@ class cellZones;
class cellZone
:
public Zone<cellZone, cellZones>
public Zone<cellZone, cellZoneList>
{
public:
@ -74,7 +74,7 @@ public:
using Zone::Zone;
//- Construct and return a clone, resetting the mesh zones
virtual autoPtr<cellZone> clone(const cellZones& mz) const
virtual autoPtr<cellZone> clone(const cellZoneList& mz) const
{
return autoPtr<cellZone>
(
@ -87,7 +87,7 @@ public:
virtual autoPtr<cellZone> clone
(
const labelUList& addr,
const cellZones& mz
const cellZoneList& mz
) const
{
return autoPtr<cellZone>

View File

@ -22,15 +22,15 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Foam::cellZones
Foam::cellZoneList
\*---------------------------------------------------------------------------*/
#ifndef cellZones_H
#define cellZones_H
#ifndef cellZoneList_H
#define cellZoneList_H
#include "cellZone.H"
#include "Zones.H"
#include "ZoneList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -40,16 +40,16 @@ namespace Foam
class polyMesh;
/*---------------------------------------------------------------------------*\
Class cellZones Declaration
Class cellZoneList Declaration
\*---------------------------------------------------------------------------*/
class cellZones
class cellZoneList
:
public Zones<cellZone, cellZones, polyMesh>
public ZoneList<cellZone, cellZoneList, polyMesh>
{
public:
using Zones<cellZone, cellZones, polyMesh>::Zones;
using ZoneList<cellZone, cellZoneList, polyMesh>::ZoneList;
};

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "faceZone.H"
#include "faceZones.H"
#include "faceZoneList.H"
#include "polyMesh.H"
#include "polyTopoChangeMap.H"
#include "syncTools.H"
@ -34,7 +34,7 @@ License
namespace Foam
{
typedef Zone<faceZone, faceZones> faceZoneType;
typedef Zone<faceZone, faceZoneList> faceZoneType;
defineTemplateRunTimeSelectionTable(faceZoneType, dictionary);
defineTypeNameAndDebug(faceZone, 0);
@ -204,10 +204,10 @@ Foam::faceZone::faceZone
const word& name,
const labelUList& addr,
const boolList& fm,
const faceZones& mz
const faceZoneList& mz
)
:
Zone<faceZone, faceZones>(name, addr, mz),
Zone<faceZone, faceZoneList>(name, addr, mz),
flipMap_(fm),
patchPtr_(nullptr),
masterCellsPtr_(nullptr),
@ -223,10 +223,10 @@ Foam::faceZone::faceZone
const word& name,
labelList&& addr,
boolList&& fm,
const faceZones& mz
const faceZoneList& mz
)
:
Zone<faceZone, faceZones>(name, move(addr), mz),
Zone<faceZone, faceZoneList>(name, move(addr), mz),
flipMap_(move(fm)),
patchPtr_(nullptr),
masterCellsPtr_(nullptr),
@ -241,10 +241,10 @@ Foam::faceZone::faceZone
(
const word& name,
const dictionary& dict,
const faceZones& mz
const faceZoneList& mz
)
:
Zone<faceZone, faceZones>(name, dict, mz),
Zone<faceZone, faceZoneList>(name, dict, mz),
flipMap_(dict.lookup("flipMap")),
patchPtr_(nullptr),
masterCellsPtr_(nullptr),
@ -260,10 +260,10 @@ Foam::faceZone::faceZone
const faceZone& fz,
const labelUList& addr,
const boolList& fm,
const faceZones& mz
const faceZoneList& mz
)
:
Zone<faceZone, faceZones>(fz, addr, mz),
Zone<faceZone, faceZoneList>(fz, addr, mz),
flipMap_(fm),
patchPtr_(nullptr),
masterCellsPtr_(nullptr),
@ -279,10 +279,10 @@ Foam::faceZone::faceZone
const faceZone& fz,
labelList&& addr,
boolList&& fm,
const faceZones& mz
const faceZoneList& mz
)
:
Zone<faceZone, faceZones>(fz, move(addr), mz),
Zone<faceZone, faceZoneList>(fz, move(addr), mz),
flipMap_(move(fm)),
patchPtr_(nullptr),
masterCellsPtr_(nullptr),

View File

@ -28,7 +28,7 @@ Description
A subset of mesh faces organised as a primitive patch.
For quick check whether a face belongs to the zone use the lookup
mechanism in faceZones, where all the zoned faces are registered
mechanism in faceZoneList, where all the zoned faces are registered
with their zone number.
SourceFiles
@ -48,7 +48,7 @@ SourceFiles
namespace Foam
{
class faceZones;
class faceZoneList;
/*---------------------------------------------------------------------------*\
Class faceZone Declaration
@ -56,7 +56,7 @@ class faceZones;
class faceZone
:
public Zone<faceZone, faceZones>
public Zone<faceZone, faceZoneList>
{
// Private Data
@ -108,7 +108,7 @@ protected:
public:
typedef faceZones ZonesType;
typedef faceZoneList ZonesType;
// Static Data Members
@ -127,7 +127,7 @@ public:
const word& name,
const labelUList& addr,
const boolList& fm,
const faceZones& mz
const faceZoneList& mz
);
//- Construct from components, moving contents
@ -136,7 +136,7 @@ public:
const word& name,
labelList&& addr,
boolList&& fm,
const faceZones&
const faceZoneList&
);
//- Construct from dictionary
@ -144,7 +144,7 @@ public:
(
const word& name,
const dictionary&,
const faceZones&
const faceZoneList&
);
//- Construct given the original zone and resetting the
@ -154,7 +154,7 @@ public:
const faceZone&,
const labelUList& addr,
const boolList& fm,
const faceZones&
const faceZoneList&
);
//- Construct given the original zone, resetting the
@ -164,14 +164,14 @@ public:
const faceZone&,
labelList&& addr,
boolList&& fm,
const faceZones&
const faceZoneList&
);
//- Disallow default bitwise copy construction
faceZone(const faceZone&) = delete;
//- Construct and return a clone, resetting the mesh zones
virtual autoPtr<faceZone> clone(const faceZones& mz) const
virtual autoPtr<faceZone> clone(const faceZoneList& mz) const
{
return autoPtr<faceZone>
(
@ -185,7 +185,7 @@ public:
(
const labelUList& addr,
const boolList& fm,
const faceZones& mz
const faceZoneList& mz
) const
{
return autoPtr<faceZone>

View File

@ -23,11 +23,11 @@ License
\*---------------------------------------------------------------------------*/
#include "faceZones.H"
#include "faceZoneList.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::boolList Foam::faceZones::zonesFlipFace
Foam::boolList Foam::faceZoneList::zonesFlipFace
(
const label facei,
const labelList& faceiZones
@ -46,7 +46,7 @@ Foam::boolList Foam::faceZones::zonesFlipFace
}
void Foam::faceZones::insert(const List<Map<bool>>& zonesIndices)
void Foam::faceZoneList::insert(const List<Map<bool>>& zonesIndices)
{
PtrList<faceZone>& zones = *this;

View File

@ -22,15 +22,15 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Foam::faceZones
Foam::faceZoneList
\*---------------------------------------------------------------------------*/
#ifndef faceZones_H
#define faceZones_H
#ifndef faceZoneList_H
#define faceZoneList_H
#include "faceZone.H"
#include "Zones.H"
#include "ZoneList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -43,13 +43,13 @@ class polyMesh;
Class cellZones Declaration
\*---------------------------------------------------------------------------*/
class faceZones
class faceZoneList
:
public Zones<faceZone, faceZones, polyMesh>
public ZoneList<faceZone, faceZoneList, polyMesh>
{
public:
using Zones<faceZone, faceZones, polyMesh>::Zones;
using ZoneList<faceZone, faceZoneList, polyMesh>::ZoneList;
// Member Functions

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "pointZone.H"
#include "pointZones.H"
#include "pointZoneList.H"
#include "polyMesh.H"
#include "polyTopoChangeMap.H"
#include "syncTools.H"
@ -34,7 +34,7 @@ License
namespace Foam
{
typedef Zone<pointZone, pointZones> pointZoneType;
typedef Zone<pointZone, pointZoneList> pointZoneType;
defineTemplateRunTimeSelectionTable(pointZoneType, dictionary);
defineTypeNameAndDebug(pointZone, 0);

View File

@ -30,7 +30,7 @@ Description
list.
For quick check whether a point belongs to the zone use the lookup
mechanism in pointZones, where all the zoned points are registered
mechanism in pointZoneList, where all the zoned points are registered
with their zone number.
SourceFiles
@ -48,7 +48,7 @@ SourceFiles
namespace Foam
{
class pointZones;
class pointZoneList;
/*---------------------------------------------------------------------------*\
Class pointZone Declaration
@ -56,7 +56,7 @@ class pointZones;
class pointZone
:
public Zone<pointZone, pointZones>
public Zone<pointZone, pointZoneList>
{
public:
@ -76,7 +76,7 @@ public:
using Zone::Zone;
//- Construct and return a clone, resetting the mesh zones
virtual autoPtr<pointZone> clone(const pointZones& mz) const
virtual autoPtr<pointZone> clone(const pointZoneList& mz) const
{
return autoPtr<pointZone>
(
@ -89,7 +89,7 @@ public:
virtual autoPtr<pointZone> clone
(
const labelUList& addr,
const pointZones& mz
const pointZoneList& mz
) const
{
return autoPtr<pointZone>

View File

@ -22,15 +22,15 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Foam::pointZones
Foam::pointZoneList
\*---------------------------------------------------------------------------*/
#ifndef pointZones_H
#define pointZones_H
#ifndef pointZoneList_H
#define pointZoneList_H
#include "pointZone.H"
#include "Zones.H"
#include "ZoneList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -40,16 +40,16 @@ namespace Foam
class polyMesh;
/*---------------------------------------------------------------------------*\
Class pointZones Declaration
Class pointZoneList Declaration
\*---------------------------------------------------------------------------*/
class pointZones
class pointZoneList
:
public Zones<pointZone, pointZones, polyMesh>
public ZoneList<pointZone, pointZoneList, polyMesh>
{
public:
using Zones<pointZone, pointZones, polyMesh>::Zones;
using ZoneList<pointZone, pointZoneList, polyMesh>::ZoneList;
};

View File

@ -470,7 +470,7 @@ void Foam::cellTable::addCellZones
}
zoneUsed.setSize(nZone);
cellZones& czMesh = mesh.cellZones();
cellZoneList& czMesh = mesh.cellZones();
czMesh.clear();
if (nZone <= 1)

View File

@ -85,7 +85,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection
if (frozenPointsZone_.size() > 0)
{
const pointZones& pZones = mesh.pointZones();
const pointZoneList& pZones = mesh.pointZones();
zonePtr = &pZones[frozenPointsZone_];

View File

@ -84,7 +84,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection
if (frozenPointsZone_.size() > 0)
{
const pointZones& pZones = mesh.pointZones();
const pointZoneList& pZones = mesh.pointZones();
zonePtr = &pZones[frozenPointsZone_];

View File

@ -481,7 +481,7 @@ void Foam::moleculeCloud::initialiseMolecules
<< "Initialising molecules in each zone specified in mdInitialiseDict."
<< endl;
const cellZones& cellZones = mesh_.cellZones();
const cellZoneList& cellZones = mesh_.cellZones();
if (!cellZones.size())
{

View File

@ -82,7 +82,7 @@ void Foam::FacePostProcessing<CloudType>::write()
{
const fvMesh& mesh = this->owner().mesh();
const Time& time = mesh.time();
const faceZones& mfz = mesh.faceZones();
const faceZoneList& mfz = mesh.faceZones();
scalar timeNew = time.value();
scalar timeElapsed = timeNew - timeOld_;
@ -264,7 +264,7 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing
outputFilePtr_.setSize(faceZoneNames.size());
DynamicList<label> zoneIDs;
const faceZones& mfz = owner.mesh().faceZones();
const faceZoneList& mfz = owner.mesh().faceZones();
const surfaceScalarField& magSf = owner.mesh().magSf();
const polyBoundaryMesh& pbm = owner.mesh().boundaryMesh();
forAll(faceZoneNames, i)
@ -357,7 +357,7 @@ void Foam::FacePostProcessing<CloudType>::preFace(const parcelType& p)
|| this->owner().solution().transient()
)
{
const faceZones& mfz = this->owner().mesh().faceZones();
const faceZoneList& mfz = this->owner().mesh().faceZones();
forAll(faceZoneIndices_, i)
{

View File

@ -1388,7 +1388,7 @@ Foam::autoPtr<Foam::polyDistributionMap> Foam::meshRefinement::balance
const PtrList<surfaceZonesInfo>& surfZones =
surfaces().surfZones();
const faceZones& fZones = mesh_.faceZones();
const faceZoneList& fZones = mesh_.faceZones();
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
// Get faces whose owner and neighbour should stay together,
@ -1801,7 +1801,7 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField
void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh)
{
const faceZones& fZones = mesh.faceZones();
const faceZoneList& fZones = mesh.faceZones();
// Check any zones are present anywhere and in same order

View File

@ -214,7 +214,7 @@ Foam::Map<Foam::labelPair> Foam::meshRefinement::getZoneBafflePatches
Map<labelPair> bafflePatch(mesh_.nFaces()/1000);
const PtrList<surfaceZonesInfo>& surfZones = surfaces_.surfZones();
const faceZones& fZones = mesh_.faceZones();
const faceZoneList& fZones = mesh_.faceZones();
forAll(surfZones, surfi)
{
@ -397,7 +397,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::meshRefinement::createBaffles
void Foam::meshRefinement::checkZoneFaces() const
{
const faceZones& fZones = mesh_.faceZones();
const faceZoneList& fZones = mesh_.faceZones();
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();

View File

@ -340,7 +340,7 @@ Foam::labelList Foam::surfaceZonesInfo::addCellZonesToMesh
{
labelList surfaceToCellZone(surfList.size(), -1);
cellZones& cellZones = mesh.cellZones();
cellZoneList& cellZones = mesh.cellZones();
forAll(namedSurfaces, i)
{
@ -404,7 +404,7 @@ Foam::labelList Foam::surfaceZonesInfo::addFaceZonesToMesh
{
labelList surfaceToFaceZone(surfList.size(), -1);
faceZones& faceZones = mesh.faceZones();
faceZoneList& faceZones = mesh.faceZones();
forAll(namedSurfaces, i)
{

View File

@ -1839,7 +1839,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::snappySnapDriver::repatchToSurface
// 2. All faces on zoned surfaces
const PtrList<surfaceZonesInfo>& surfZones = surfaces.surfZones();
const faceZones& fZones = mesh.faceZones();
const faceZoneList& fZones = mesh.faceZones();
forAll(zonedSurfaces, i)
{
@ -2138,7 +2138,7 @@ void Foam::snappySnapDriver::doSnap
// Selectively 'forget' about the baffles, i.e. not check across them
// or merge across them.
{
const faceZones& fZones = mesh.faceZones();
const faceZoneList& fZones = mesh.faceZones();
const refinementSurfaces& surfaces = meshRefiner_.surfaces();
const PtrList<surfaceZonesInfo>& surfZones = surfaces.surfZones();

View File

@ -74,7 +74,7 @@ cellZoneSet::cellZoneSet
mesh_(mesh),
addressing_(0)
{
const cellZones& cellZones = mesh.cellZones();
const cellZoneList& cellZones = mesh.cellZones();
label zoneID = cellZones.findIndex(name);
if
@ -259,7 +259,7 @@ bool cellZoneSet::writeObject
const_cast<word&>(type()) = oldTypeName;
// Modify cellZone
cellZones& cellZones = const_cast<polyMesh&>(mesh_).cellZones();
cellZoneList& cellZones = const_cast<polyMesh&>(mesh_).cellZones();
label zoneID = cellZones.findIndex(name());
if (zoneID == -1)

View File

@ -79,7 +79,7 @@ faceZoneSet::faceZoneSet
addressing_(0),
flipMap_(0)
{
const faceZones& faceZones = mesh.faceZones();
const faceZoneList& faceZones = mesh.faceZones();
label zoneID = faceZones.findIndex(name);
if
@ -474,7 +474,7 @@ bool faceZoneSet::writeObject
const_cast<word&>(type()) = oldTypeName;
// Modify faceZone
faceZones& faceZones = const_cast<polyMesh&>(mesh_).faceZones();
faceZoneList& faceZones = const_cast<polyMesh&>(mesh_).faceZones();
label zoneID = faceZones.findIndex(name());
if (zoneID == -1)

View File

@ -76,7 +76,7 @@ pointZoneSet::pointZoneSet
mesh_(mesh),
addressing_(0)
{
const pointZones& pointZones = mesh.pointZones();
const pointZoneList& pointZones = mesh.pointZones();
label zoneID = pointZones.findIndex(name);
if
@ -260,7 +260,7 @@ bool pointZoneSet::writeObject
const_cast<word&>(type()) = oldTypeName;
// Modify pointZone
pointZones& pointZones = const_cast<polyMesh&>(mesh_).pointZones();
pointZoneList& pointZones = const_cast<polyMesh&>(mesh_).pointZones();
label zoneID = pointZones.findIndex(name());
if (zoneID == -1)

View File

@ -26,7 +26,7 @@ License
#include "multiSolidBodyMotionSolver.H"
#include "addToRunTimeSelectionTable.H"
#include "transformField.H"
#include "cellZones.H"
#include "cellZoneList.H"
#include "boolList.H"
#include "syncTools.H"

View File

@ -97,7 +97,7 @@ void Foam::decompositionConstraints::preserveFaceZonesConstraint::add
{
blockedFace.setSize(mesh.nFaces(), true);
const faceZones& fZones = mesh.faceZones();
const faceZoneList& fZones = mesh.faceZones();
const labelList zoneIDs = findStrings(zones_, fZones.toc());
@ -167,7 +167,7 @@ void Foam::decompositionConstraints::preserveFaceZonesConstraint::apply
// Override if differing
// ~~~~~~~~~~~~~~~~~~~~~
const faceZones& fZones = mesh.faceZones();
const faceZoneList& fZones = mesh.faceZones();
const labelList zoneIDs = findStrings(zones_, fZones.toc());

View File

@ -935,7 +935,7 @@ void Foam::domainDecomposition::decompose()
// Create point zones
{
const pointZones& pz = completeMesh().pointZones();
const pointZoneList& pz = completeMesh().pointZones();
// Go through all the zoned points and find out if they
// belong to a zone. If so, add it to the zone as
@ -999,7 +999,7 @@ void Foam::domainDecomposition::decompose()
// Create face zones
{
const faceZones& fz = completeMesh().faceZones();
const faceZoneList& fz = completeMesh().faceZones();
// Go through all the zoned face and find out if they
// belong to a zone. If so, add it to the zone as
@ -1091,7 +1091,7 @@ void Foam::domainDecomposition::decompose()
// Create cell zones
{
const cellZones& cz = completeMesh().cellZones();
const cellZoneList& cz = completeMesh().cellZones();
// Go through all the zoned cells and find out if they
// belong to a zone. If so, add it to the zone as

View File

@ -1525,7 +1525,7 @@ void Foam::fvMeshDistribute::sendMesh
// in merged-zone indices.
CompactListList<label> zonePoints;
{
const pointZones& pointZones = mesh.pointZones();
const pointZoneList& pointZones = mesh.pointZones();
labelList rowSizes(pointZoneNames.size(), 0);
@ -1555,7 +1555,7 @@ void Foam::fvMeshDistribute::sendMesh
CompactListList<label> zoneFaces;
CompactListList<bool> zoneFaceFlip;
{
const faceZones& faceZones = mesh.faceZones();
const faceZoneList& faceZones = mesh.faceZones();
labelList rowSizes(faceZoneNames.size(), 0);
@ -1587,7 +1587,7 @@ void Foam::fvMeshDistribute::sendMesh
// Assume sparse, possibly overlapping cell zones
CompactListList<label> zoneCells;
{
const cellZones& cellZones = mesh.cellZones();
const cellZoneList& cellZones = mesh.cellZones();
labelList rowSizes(cellZoneNames.size(), 0);
@ -1620,7 +1620,7 @@ void Foam::fvMeshDistribute::sendMesh
// cellZoneID.setSize(mesh.nCells());
// cellZoneID = -1;
//
// const cellZones& cellZones = mesh.cellZones();
// const cellZoneList& cellZones = mesh.cellZones();
//
// forAll(cellZones, zoneI)
// {

View File

@ -324,7 +324,7 @@ void Foam::fvMeshSubset::subsetZones()
{
// Keep all zones, even if zero size.
const pointZones& pointZones = baseMesh().pointZones();
const pointZoneList& pointZones = baseMesh().pointZones();
// PointZones
List<pointZone*> pZonePtrs(pointZones.size());
@ -343,7 +343,7 @@ void Foam::fvMeshSubset::subsetZones()
// FaceZones
const faceZones& faceZones = baseMesh().faceZones();
const faceZoneList& faceZones = baseMesh().faceZones();
// Do we need to remove zones where the side we're interested in
// no longer exists? Guess not.
@ -409,7 +409,7 @@ void Foam::fvMeshSubset::subsetZones()
}
// CellZones
const cellZones& cellZones = baseMesh().cellZones();
const cellZoneList& cellZones = baseMesh().cellZones();
List<cellZone*> cZonePtrs(cellZones.size());

View File

@ -562,8 +562,8 @@ void Foam::polyMeshAdder::mergePrimitives
void Foam::polyMeshAdder::mergePointZones
(
const label nAllPoints,
const pointZones& pz0,
const pointZones& pz1,
const pointZoneList& pz0,
const pointZoneList& pz1,
const labelList& from0ToAllPoints,
const labelList& from1ToAllPoints,
@ -712,9 +712,9 @@ void Foam::polyMeshAdder::mergeFaceZones
List<DynamicList<bool>>& fzFlips
)
{
const faceZones& fz0 = mesh0.faceZones();
const faceZoneList& fz0 = mesh0.faceZones();
const labelList& owner0 = mesh0.faceOwner();
const faceZones& fz1 = mesh1.faceZones();
const faceZoneList& fz1 = mesh1.faceZones();
const labelList& owner1 = mesh1.faceOwner();
@ -890,8 +890,8 @@ void Foam::polyMeshAdder::mergeCellZones
(
const label nAllCells,
const cellZones& cz0,
const cellZones& cz1,
const cellZoneList& cz0,
const cellZoneList& cz1,
const labelList& from1ToAllCells,
DynamicList<word>& zoneNames,

View File

@ -133,8 +133,8 @@ private:
(
const label nAllPoints,
const pointZones& pz0,
const pointZones& pz1,
const pointZoneList& pz0,
const pointZoneList& pz1,
const labelList& from0ToAllPoints,
const labelList& from1ToAllPoints,
@ -165,8 +165,8 @@ private:
(
const label nAllCells,
const cellZones& cz0,
const cellZones& cz1,
const cellZoneList& cz0,
const cellZoneList& cz1,
const labelList& from1ToAllCells,
DynamicList<word>& zoneNames,

View File

@ -2322,7 +2322,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
// ~~~~~
// Copy pointZone from old mesh
const pointZones& oldPointZones = mesh.pointZones();
const pointZoneList& oldPointZones = mesh.pointZones();
List<pointZone*> pZonePtrs(oldPointZones.size());
{
forAll(oldPointZones, i)
@ -2332,7 +2332,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
}
// Copy faceZone from old mesh
const faceZones& oldFaceZones = mesh.faceZones();
const faceZoneList& oldFaceZones = mesh.faceZones();
List<faceZone*> fZonePtrs(oldFaceZones.size());
{
forAll(oldFaceZones, i)
@ -2342,7 +2342,7 @@ Foam::autoPtr<Foam::polyTopoChangeMap> Foam::polyTopoChange::makeMesh
}
// Copy cellZone from old mesh
const cellZones& oldCellZones = mesh.cellZones();
const cellZoneList& oldCellZones = mesh.cellZones();
List<cellZone*> cZonePtrs(oldCellZones.size());
{
forAll(oldCellZones, i)

View File

@ -53,4 +53,6 @@ maxAlphaCo 1;
maxDeltaT 1;
libs ("libcellZones.so");
// ************************************************************************* //