diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files
index 4e356a2f05..bc4369cf48 100644
--- a/src/OpenFOAM/Make/files
+++ b/src/OpenFOAM/Make/files
@@ -329,7 +329,7 @@ $(cellShape)/cellShapeEqual.C
$(cellShape)/cellShapeIO.C
$(cellShape)/cellShapeIOList.C
-meshes/patchIdentifier/patchIdentifier.C
+meshes/Identifiers/patch/patchIdentifier.C
polyMesh = meshes/polyMesh
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneID/ZoneID.H b/src/OpenFOAM/meshes/Identifiers/DynamicID/DynamicID.H
similarity index 71%
rename from src/OpenFOAM/meshes/polyMesh/zones/ZoneID/ZoneID.H
rename to src/OpenFOAM/meshes/Identifiers/DynamicID/DynamicID.H
index 99caad1068..286049ed55 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneID/ZoneID.H
+++ b/src/OpenFOAM/meshes/Identifiers/DynamicID/DynamicID.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -22,43 +22,40 @@ License
along with OpenFOAM. If not, see .
Class
- Foam::ZoneID
+ Foam::DynamicID
Description
- A class that holds the data needed to identify a zone in a dynamic mesh.
+ A class that holds the data needed to identify things (zones, patches)
+ in a dynamic mesh.
- The zone is identified by name.
- Its index in the zoneMesh is updated if the mesh has changed.
+ The thing is identified by name.
+ Its indices are updated if the mesh has changed.
\*---------------------------------------------------------------------------*/
-#ifndef ZoneID_H
-#define ZoneID_H
+#ifndef DynamicID_H
+#define DynamicID_H
#include "keyType.H"
#include "labelList.H"
-#include "polyMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
-template class ZoneMesh;
-
// Forward declaration of friend functions and operators
+template class DynamicID;
-template class ZoneID;
-
-template
-Ostream& operator<<(Ostream&, const ZoneID&);
+template
+Ostream& operator<<(Ostream&, const DynamicID&);
/*---------------------------------------------------------------------------*\
- Class ZoneID Declaration
+ Class DynamicID Declaration
\*---------------------------------------------------------------------------*/
-template
-class ZoneID
+template
+class DynamicID
{
// Private data
@@ -74,17 +71,17 @@ public:
// Constructors
//- Construct from name
- ZoneID(const keyType& key, const ZoneMesh& zm)
+ DynamicID(const keyType& key, const ObjectType& obj)
:
key_(key),
- indices_(zm.findIndices(key_))
+ indices_(obj.findIndices(key_))
{}
//- Construct from Istream
- ZoneID(Istream& is, const ZoneMesh& zm)
+ DynamicID(Istream& is, const ObjectType& obj)
:
key_(is),
- indices_(zm.findIndices(key_))
+ indices_(obj.findIndices(key_))
{}
@@ -123,30 +120,30 @@ public:
// Edit
//- Update
- void update(const ZoneMesh& zm)
+ void update(const ObjectType& obj)
{
- indices_ = zm.findIndices(key_);
+ indices_ = obj.findIndices(key_);
}
// IOstream Operators
- friend Ostream& operator<<
- (Ostream&, const ZoneID&);
+ friend Ostream& operator<<
+ (Ostream&, const DynamicID&);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-template
-Ostream& operator<<(Ostream& os, const ZoneID& p)
+template
+Ostream& operator<<(Ostream& os, const DynamicID& dynId)
{
os << token::BEGIN_LIST
- << p.name() << token::SPACE << p.index()
+ << dynId.name() << token::SPACE << dynId.index()
<< token::END_LIST;
// Check state of Ostream
- os.check("Ostream& operator<<(Ostream&, const ZoneID&)");
+ os.check("Ostream& operator<<(Ostream&, const DynamicID&)");
return os;
}
diff --git a/src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.C b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C
similarity index 100%
rename from src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.C
rename to src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C
diff --git a/src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.H b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H
similarity index 100%
rename from src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.H
rename to src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H
diff --git a/src/OpenFOAM/meshes/Identifiers/patch/polyPatchID.H b/src/OpenFOAM/meshes/Identifiers/patch/polyPatchID.H
new file mode 100644
index 0000000000..eaa7423601
--- /dev/null
+++ b/src/OpenFOAM/meshes/Identifiers/patch/polyPatchID.H
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef polyPatchID_H
+#define polyPatchID_H
+
+#include "DynamicID.H"
+#include "polyBoundaryMesh.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+ //- Foam::polyPatchID
+ typedef DynamicID polyPatchID;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneID/ZoneIDs.H b/src/OpenFOAM/meshes/Identifiers/zones/ZoneIDs.H
similarity index 81%
rename from src/OpenFOAM/meshes/polyMesh/zones/ZoneID/ZoneIDs.H
rename to src/OpenFOAM/meshes/Identifiers/zones/ZoneIDs.H
index 0dc0a43c99..9b7a6415f2 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneID/ZoneIDs.H
+++ b/src/OpenFOAM/meshes/Identifiers/zones/ZoneIDs.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -26,21 +26,26 @@ License
#ifndef ZoneIDs_H
#define ZoneIDs_H
-#include "ZoneID.H"
-#include "pointZone.H"
-#include "faceZone.H"
-#include "cellZone.H"
+#include "DynamicID.H"
+
+#include "cellZoneMeshFwd.H"
+#include "faceZoneMeshFwd.H"
+#include "pointZoneMeshFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
- //- Foam::pointZoneID
- typedef ZoneID pointZoneID;
- //- Foam::faceZoneID
- typedef ZoneID faceZoneID;
+
//- Foam::cellZoneID
- typedef ZoneID cellZoneID;
+ typedef DynamicID cellZoneID;
+
+ //- Foam::faceZoneID
+ typedef DynamicID faceZoneID;
+
+ //- Foam::pointZoneID
+ typedef DynamicID pointZoneID;
+
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneID/polyPatchID.H b/src/OpenFOAM/meshes/polyMesh/zones/ZoneID/polyPatchID.H
deleted file mode 100644
index 75f6a61304..0000000000
--- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneID/polyPatchID.H
+++ /dev/null
@@ -1,158 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Class
- Foam::polyPatchID
-
-Description
- A class holds the data needed to identify a patch in a dynamic mesh.
-
- The patch is identified by name and its index in the boundary mesh
- is updated if the mesh has changed.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef polyPatchID_H
-#define polyPatchID_H
-
-#include "keyType.H"
-#include "labelList.H"
-#include "polyBoundaryMesh.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// Forward declaration of friend functions and operators
-
-class polyPatchID;
-Ostream& operator<<(Ostream&, const polyPatchID&);
-
-
-/*---------------------------------------------------------------------------*\
- Class polyPatchID Declaration
-\*---------------------------------------------------------------------------*/
-
-class polyPatchID
-{
- // Private data
-
- //- Patch name
- keyType key_;
-
- //- Patch indices
- labelList indices_;
-
-
-public:
-
- // Constructors
-
- //- Construct from name
- polyPatchID(const keyType& key, const polyBoundaryMesh& bm)
- :
- key_(key),
- index_(bm.findIndices(key_))
- {}
-
- //- Construct from Istream
- polyPatchID(Istream& is, const polyBoundaryMesh& bm)
- :
- key_(is),
- index_(bm.findIndices(key_))
- {}
-
-
- // Destructor - default
-
-
- // Member Functions
-
- // Access
-
- //- Return name
- const keyType& name() const
- {
- return key_;
- }
-
- //- Return indices of matching patches
- const labelList& indices() const
- {
- return indices_;
- }
-
- //- Return index of first matching patch
- label index() const
- {
- return indices_.empty() ? -1 : indices_[0];
- }
-
- //- Has the patch been found
- bool active() const
- {
- return !indices_.empty();
- }
-
-
- // Edit
-
- //- Update
- void update(const polyBoundaryMesh& bm)
- {
- indices_ = bm.findIndices(key_);
- }
-
-
- // Ostream Operator
-
- friend Ostream& operator<<(Ostream&, const polyPatchID&);
-
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-Ostream& operator<<(Ostream& os, const polyPatchID& p)
-{
- os << token::BEGIN_LIST
- << p.name() << token::SPACE << p.index()
- << token::END_LIST;
-
- // Check state of Ostream
- os.check("Ostream& operator<<(Ostream&, const polyPatchID&)");
-
- return os;
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //