dynamicMesh: Renamed boundaryMesh to repatchMesh and removed unused code

This commit is contained in:
Will Bainbridge
2021-06-22 09:20:45 +01:00
parent 9283955b99
commit 3baba56734
9 changed files with 142 additions and 970 deletions

View File

@ -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-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,7 +33,7 @@ Description
#include "argList.H" #include "argList.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "Time.H" #include "Time.H"
#include "boundaryMesh.H" #include "repatchMesh.H"
#include "repatchPolyTopoChanger.H" #include "repatchPolyTopoChanger.H"
#include "unitConversion.H" #include "unitConversion.H"
#include "OFstream.H" #include "OFstream.H"
@ -44,21 +44,21 @@ using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Get all feature edges. // Get all feature edges.
void collectFeatureEdges(const boundaryMesh& bMesh, labelList& markedEdges) void collectFeatureEdges(const repatchMesh& rMesh, labelList& markedEdges)
{ {
markedEdges.setSize(bMesh.mesh().nEdges()); markedEdges.setSize(rMesh.mesh().nEdges());
label markedI = 0; label markedI = 0;
forAll(bMesh.featureSegments(), i) forAll(rMesh.featureSegments(), i)
{ {
const labelList& segment = bMesh.featureSegments()[i]; const labelList& segment = rMesh.featureSegments()[i];
forAll(segment, j) forAll(segment, j)
{ {
label featEdgeI = segment[j]; label featEdgeI = segment[j];
label meshEdgeI = bMesh.featureToEdge()[featEdgeI]; label meshEdgeI = rMesh.featureToEdge()[featEdgeI];
markedEdges[markedI++] = meshEdgeI; markedEdges[markedI++] = meshEdgeI;
} }
@ -95,24 +95,24 @@ int main(int argc, char *argv[])
<< endl; << endl;
// //
// Use boundaryMesh to reuse all the featureEdge stuff in there. // Use repatchMesh to reuse all the featureEdge stuff in there.
// //
boundaryMesh bMesh; repatchMesh rMesh;
bMesh.read(mesh); rMesh.read(mesh);
// Set feature angle (calculate feature edges) // Set feature angle (calculate feature edges)
bMesh.setFeatureEdges(minCos); rMesh.setFeatureEdges(minCos);
// Collect all feature edges as edge labels // Collect all feature edges as edge labels
labelList markedEdges; labelList markedEdges;
collectFeatureEdges(bMesh, markedEdges); collectFeatureEdges(rMesh, markedEdges);
// (new) patch ID for every face in mesh. // (new) patch ID for every face in mesh.
labelList patchIDs(bMesh.mesh().size(), -1); labelList patchIDs(rMesh.mesh().size(), -1);
// //
// Fill patchIDs with values for every face by floodfilling without // Fill patchIDs with values for every face by floodfilling without
@ -120,7 +120,7 @@ int main(int argc, char *argv[])
// //
// Current patch number. // Current patch number.
label newPatchi = bMesh.patches().size(); label newPatchi = rMesh.patches().size();
label suffix = 0; label suffix = 0;
@ -141,17 +141,17 @@ int main(int argc, char *argv[])
{ {
patchName = "auto" + name(suffix++); patchName = "auto" + name(suffix++);
} }
while (bMesh.findPatchID(patchName) != -1); while (rMesh.findPatchID(patchName) != -1);
bMesh.addPatch(patchName); rMesh.addPatch(patchName);
bMesh.changePatchType(patchName, "patch"); rMesh.changePatchType(patchName, "patch");
// Fill visited with all faces reachable from unsetFacei. // Fill visited with all faces reachable from unsetFacei.
boolList visited(bMesh.mesh().size()); boolList visited(rMesh.mesh().size());
bMesh.markFaces(markedEdges, unsetFacei, visited); rMesh.markFaces(markedEdges, unsetFacei, visited);
// Assign all visited faces to current patch // Assign all visited faces to current patch
@ -175,7 +175,7 @@ int main(int argc, char *argv[])
const PtrList<boundaryPatch>& patches = bMesh.patches(); const PtrList<repatchPatch>& patches = rMesh.patches();
// Create new list of patches with old ones first // Create new list of patches with old ones first
List<polyPatch*> newPatchPtrList(patches.size()); List<polyPatch*> newPatchPtrList(patches.size());
@ -202,7 +202,7 @@ int main(int argc, char *argv[])
// Add new ones with empty size. // Add new ones with empty size.
for (label patchi = newPatchi; patchi < patches.size(); patchi++) for (label patchi = newPatchi; patchi < patches.size(); patchi++)
{ {
const boundaryPatch& bp = patches[patchi]; const repatchPatch& bp = patches[patchi];
newPatchPtrList[newPatchi] = polyPatch::New newPatchPtrList[newPatchi] = polyPatch::New
( (
@ -230,9 +230,9 @@ int main(int argc, char *argv[])
// Change face ordering // Change face ordering
// Since bMesh read from mesh there is one to one mapping so we don't // Since rMesh read from mesh there is one to one mapping so we don't
// have to do the geometric stuff. // have to do the geometric stuff.
const labelList& meshFace = bMesh.meshFace(); const labelList& meshFace = rMesh.meshFace();
forAll(patchIDs, facei) forAll(patchIDs, facei)
{ {

View File

@ -3,7 +3,6 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-ltriSurface \ -ltriSurface \
-lmeshTools \ -lmeshTools \

View File

@ -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-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,14 +25,14 @@ Application
surfaceToPatch surfaceToPatch
Description Description
Reads surface and applies surface regioning to a mesh. Uses boundaryMesh Reads surface and applies surface regioning to a mesh. Uses repatchMesh
to do the hard work. to do the hard work.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "Time.H" #include "Time.H"
#include "boundaryMesh.H" #include "repatchMesh.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "faceSet.H" #include "faceSet.H"
#include "polyTopoChange.H" #include "polyTopoChange.H"
@ -103,7 +103,7 @@ label addPatch(polyMesh& mesh, const word& patchName)
bool repatchFace bool repatchFace
( (
const polyMesh& mesh, const polyMesh& mesh,
const boundaryMesh& bMesh, const repatchMesh& rMesh,
const labelList& nearest, const labelList& nearest,
const labelList& surfToMeshPatch, const labelList& surfToMeshPatch,
const label facei, const label facei,
@ -117,9 +117,9 @@ bool repatchFace
if (nearest[bFacei] != -1) if (nearest[bFacei] != -1)
{ {
// Use boundary mesh one. // Use boundary mesh one.
label bMeshPatchID = bMesh.whichPatch(nearest[bFacei]); label rMeshPatchID = rMesh.whichPatch(nearest[bFacei]);
label patchID = surfToMeshPatch[bMeshPatchID]; label patchID = surfToMeshPatch[rMeshPatchID];
if (patchID != mesh.boundaryMesh().whichPatch(facei)) if (patchID != mesh.boundaryMesh().whichPatch(facei))
{ {
@ -230,13 +230,13 @@ int main(int argc, char *argv[])
Info<< endl; Info<< endl;
boundaryMesh bMesh; repatchMesh rMesh;
// Load in the surface. // Load in the surface.
bMesh.readTriSurface(surfName); rMesh.readTriSurface(surfName);
// Add all the boundaryMesh patches to the mesh. // Add all the boundaryMesh patches to the mesh.
const PtrList<boundaryPatch>& bPatches = bMesh.patches(); const PtrList<repatchPatch>& bPatches = rMesh.patches();
// Map from surface patch ( = boundaryMesh patch) to polyMesh patch // Map from surface patch ( = boundaryMesh patch) to polyMesh patch
labelList patchMap(bPatches.size()); labelList patchMap(bPatches.size());
@ -246,10 +246,10 @@ int main(int argc, char *argv[])
patchMap[i] = addPatch(mesh, bPatches[i].name()); patchMap[i] = addPatch(mesh, bPatches[i].name());
} }
// Obtain nearest face in bMesh for each boundary face in mesh that // Obtain nearest face in rMesh for each boundary face in mesh that
// is within search span. // is within search span.
// Note: should only determine for faceSet if working with that. // Note: should only determine for faceSet if working with that.
labelList nearest(bMesh.getNearest(mesh, searchSpan)); labelList nearest(rMesh.getNearest(mesh, searchSpan));
{ {
// Dump unmatched faces to faceSet for debugging. // Dump unmatched faces to faceSet for debugging.
@ -285,7 +285,7 @@ int main(int argc, char *argv[])
{ {
label facei = iter.key(); label facei = iter.key();
if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod)) if (repatchFace(mesh, rMesh, nearest, patchMap, facei, meshMod))
{ {
nChanged++; nChanged++;
} }
@ -297,7 +297,7 @@ int main(int argc, char *argv[])
{ {
label facei = mesh.nInternalFaces() + bFacei; label facei = mesh.nInternalFaces() + bFacei;
if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod)) if (repatchFace(mesh, rMesh, nearest, patchMap, facei, meshMod))
{ {
nChanged++; nChanged++;
} }

View File

@ -53,8 +53,9 @@ slidingInterface/decoupleSlidingInterface.C
perfectInterface/perfectInterface.C perfectInterface/perfectInterface.C
boundaryMesh/boundaryMesh.C repatchMesh/repatchMesh.C
boundaryPatch/boundaryPatch.C repatchMesh/repatchPatch.C
setUpdater/setUpdater.C setUpdater/setUpdater.C
meshModifiers = meshCut/meshModifiers meshModifiers = meshCut/meshModifiers

View File

@ -1,51 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ 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 <http://www.gnu.org/licenses/>.
Typedef
Foam::bMesh
Description
Holder of faceList and points. (v.s. e.g. primitivePatch which references
points)
\*---------------------------------------------------------------------------*/
#ifndef bMesh_H
#define bMesh_H
#include "PrimitivePatch.H"
#include "faceList.H"
#include "pointField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef PrimitivePatch<faceList, const pointField> bMesh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,22 +22,21 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::boundaryMesh Foam::repatchMesh
Description Description
Addressing for all faces on surface of mesh. Can either be read Addressing for all faces on surface of mesh. Can either be read
from polyMesh or from triSurface. Used for repatching existing meshes. from polyMesh or from triSurface. Used for repatching existing meshes.
SourceFiles SourceFiles
boundaryMesh.C repatchMesh.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef boundaryMesh_H #ifndef repatchMesh_H
#define boundaryMesh_H #define repatchMesh_H
#include "bMesh.H" #include "repatchPatch.H"
#include "boundaryPatch.H"
#include "PrimitivePatch.H" #include "PrimitivePatch.H"
#include "PtrList.H" #include "PtrList.H"
#include "polyPatchList.H" #include "polyPatchList.H"
@ -49,16 +48,25 @@ namespace Foam
{ {
// Forward declaration of classes // Forward declaration of classes
class Time;
class polyMesh; class polyMesh;
class primitiveMesh; class primitiveMesh;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class boundaryMesh Declaration Class repatchMesh Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class boundaryMesh class repatchMesh
{ {
public:
// Public Typedefs
//- Type of the mesh
typedef PrimitivePatch<faceList, const pointField> rMesh;
private:
// Static data // Static data
//- Normal along which to divide faces into categories //- Normal along which to divide faces into categories
@ -74,20 +82,15 @@ class boundaryMesh
// Private Data // Private Data
//- All boundary mesh data. Reconstructed every time faces are repatched //- All boundary mesh data. Reconstructed every time faces are repatched
bMesh* meshPtr_; autoPtr<rMesh> meshPtr_;
//- Patches. Reconstructed every time faces are repatched. //- Patches. Reconstructed every time faces are repatched.
PtrList<boundaryPatch> patches_; PtrList<repatchPatch> patches_;
//- For every face in mesh() gives corresponding polyMesh face //- For every face in mesh() gives corresponding polyMesh face
// (not sensible if mesh read from triSurface) // (not sensible if mesh read from triSurface)
labelList meshFace_; labelList meshFace_;
//
// Edge handling
//
//- Points referenced by feature edges. //- Points referenced by feature edges.
pointField featurePoints_; pointField featurePoints_;
@ -104,9 +107,6 @@ class boundaryMesh
// Indices into featureEdges_. // Indices into featureEdges_.
labelListList featureSegments_; labelListList featureSegments_;
//- Additional edges (indices of mesh edges)
labelList extraEdges_;
// Private Member Functions // Private Member Functions
@ -124,24 +124,6 @@ class boundaryMesh
boolList& featVisited boolList& featVisited
) const; ) const;
//- Do point-edge walk to determine nearest (to edgeI). Stops if
// distance >= maxDistance. Used to determine edges close to seed
// point.
void markEdges
(
const label maxDistance,
const label edgeI,
const label distance,
labelList& minDistance,
DynamicList<label>& visited
) const;
//- Get index of polypatch by name
label findPatchID(const polyPatchList&, const word&) const;
//- Get index of patch for face
label whichPatch(const polyPatchList&, const label) const;
//- Gets labels of changed faces and propagates them to the edges. //- Gets labels of changed faces and propagates them to the edges.
// Returns labels of edges changed. Fills edgeRegion of visited edges // Returns labels of edges changed. Fills edgeRegion of visited edges
// with current region. // with current region.
@ -175,31 +157,30 @@ class boundaryMesh
public: public:
//- Runtime type information //- Runtime type information
ClassName("boundaryMesh"); ClassName("repatchMesh");
// Constructors // Constructors
//- Construct null //- Construct null
boundaryMesh(); repatchMesh();
//- Disallow default bitwise copy construction //- Disallow default bitwise copy construction
boundaryMesh(const boundaryMesh&) = delete; repatchMesh(const repatchMesh&) = delete;
//- Destructor //- Destructor
~boundaryMesh(); ~repatchMesh();
void clearOut();
// Member Functions // Member Functions
// Access // Access
const bMesh& mesh() const //- Access the boundary mesh
const rMesh& mesh() const
{ {
if (!meshPtr_) if (!meshPtr_.valid())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "No mesh available. Probably mesh not yet" << "No mesh available. Probably mesh not yet"
@ -208,12 +189,12 @@ public:
return *meshPtr_; return *meshPtr_;
} }
const PtrList<boundaryPatch>& patches() const //- Access the patches
const PtrList<repatchPatch>& patches() const
{ {
return patches_; return patches_;
} }
//- Label of original face in polyMesh (before patchify(...)) //- Label of original face in polyMesh (before patchify(...))
const labelList& meshFace() const const labelList& meshFace() const
{ {
@ -250,25 +231,16 @@ public:
return featureSegments_; return featureSegments_;
} }
//- Indices into edges of additional edges.
const labelList& extraEdges() const
{
return extraEdges_;
}
// Edit // Edit
//- Read from boundaryMesh of polyMesh. //- Read from repatchMesh of polyMesh.
void read(const polyMesh&); void read(const polyMesh&);
//- Read from triSurface //- Read from triSurface
void readTriSurface(const fileName&); void readTriSurface(const fileName&);
//- Write to file. //- Get rMesh index of nearest face for every boundary face in
void writeTriSurface(const fileName&) const;
//- Get bMesh index of nearest face for every boundary face in
// pMesh. Gets passed initial search box. If not found // pMesh. Gets passed initial search box. If not found
// returns -1 for the face. // returns -1 for the face.
labelList getNearest labelList getNearest
@ -277,20 +249,6 @@ public:
const vector& searchSpan const vector& searchSpan
) const; ) const;
//- Take over patches onto polyMesh from nearest face in *this
// (from call to getNearest). Insert as
// -new set of patches (newMesh.addPatches)
// -topoChanges to change faces.
// nearest is list of nearest face in *this for every boundary
// face. oldPatches is list of existing patches in mesh.
// newMesh is the mesh to which the new patches are added.
// (so has to be constructed without patches).
void patchify
(
const labelList& nearest,
const polyBoundaryMesh& oldPatches,
polyMesh& newMesh
) const;
// Patches // Patches
@ -300,9 +258,6 @@ public:
//- Get index of patch by name //- Get index of patch by name
label findPatchID(const word& patchName) const; label findPatchID(const word& patchName) const;
//- Get names of patches
wordList patchNames() const;
//- Add to back of patch list. //- Add to back of patch list.
void addPatch(const word& patchName); void addPatch(const word& patchName);
@ -312,10 +267,6 @@ public:
//- Change patch. //- Change patch.
void changePatchType(const word& patchName, const word& type); void changePatchType(const word& patchName, const word& type);
//- Recalculate face ordering and patches. Return old to new
// mapping.
void changeFaces(const labelList& patchIDs, labelList& oldToNew);
// Edges // Edges
@ -323,50 +274,6 @@ public:
// to angle of faces across edge // to angle of faces across edge
void setFeatureEdges(const scalar minCos); void setFeatureEdges(const scalar minCos);
//- Set extraEdges to edges 'near' to edgeI. Uses point-edge walk
// to determine 'near'.
void setExtraEdges(const label edgeI);
// Faces
//- Simple triangulation of face subset. Returns number of triangles
// needed.
label getNTris(const label facei) const;
//- Simple triangulation of face subset. TotalNTris is total number
// of triangles, nTris is per face number of triangles.
label getNTris
(
const label startFacei,
const label nFaces,
labelList& nTris
) const;
//- Simple triangulation of face subset. TotalNTris is total number
// of triangles (from call to getNTris)
// triVerts is triangle vertices, three per triangle.
void triangulate
(
const label startFacei,
const label nFaces,
const label totalNTris,
labelList& triVerts
) const;
//- Number of points used in face subset.
label getNPoints(const label startFacei, const label nFaces) const;
//- Same as triangulate but in local vertex numbering.
// (Map returned).
void triangulateLocal
(
const label startFacei,
const label nFaces,
const label totalNTris,
labelList& triVerts,
labelList& localToGlobal
) const;
// Other // Other
@ -382,7 +289,7 @@ public:
// Member Operators // Member Operators
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const boundaryMesh&) = delete; void operator=(const repatchMesh&) = delete;
}; };

View File

@ -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-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,13 +23,13 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "boundaryPatch.H" #include "repatchPatch.H"
#include "dictionary.H" #include "dictionary.H"
#include "Ostream.H" #include "Ostream.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::boundaryPatch::boundaryPatch Foam::repatchPatch::repatchPatch
( (
const word& name, const word& name,
const label index, const label index,
@ -44,7 +44,7 @@ Foam::boundaryPatch::boundaryPatch
{} {}
Foam::boundaryPatch::boundaryPatch Foam::repatchPatch::repatchPatch
( (
const word& name, const word& name,
const dictionary& dict, const dictionary& dict,
@ -57,7 +57,7 @@ Foam::boundaryPatch::boundaryPatch
{} {}
Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index) Foam::repatchPatch::repatchPatch(const repatchPatch& p, const label index)
: :
patchIdentifier(p.name(), index, p.physicalType()), patchIdentifier(p.name(), index, p.physicalType()),
size_(p.size()), size_(p.size()),
@ -65,21 +65,21 @@ Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index)
{} {}
Foam::autoPtr<Foam::boundaryPatch> Foam::boundaryPatch::clone() const Foam::autoPtr<Foam::repatchPatch> Foam::repatchPatch::clone() const
{ {
return autoPtr<boundaryPatch>(new boundaryPatch(*this)); return autoPtr<repatchPatch>(new repatchPatch(*this));
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::boundaryPatch::~boundaryPatch() Foam::repatchPatch::~repatchPatch()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::boundaryPatch::write(Ostream& os) const void Foam::repatchPatch::write(Ostream& os) const
{ {
patchIdentifier::write(os); patchIdentifier::write(os);
writeEntry(os, "nFaces", size_); writeEntry(os, "nFaces", size_);
@ -89,10 +89,10 @@ void Foam::boundaryPatch::write(Ostream& os) const
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const boundaryPatch& p) Foam::Ostream& Foam::operator<<(Ostream& os, const repatchPatch& p)
{ {
p.write(os); p.write(os);
os.check("Ostream& operator<<(Ostream& f, const boundaryPatch&)"); os.check("Ostream& operator<<(Ostream& f, const repatchPatch&)");
return os; return os;
} }

View File

@ -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-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,19 +22,19 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::boundaryPatch Foam::repatchPatch
Description Description
Like polyPatch but without reference to mesh. patchIdentifier::index Like polyPatch but without reference to mesh. patchIdentifier::index
is not used. Used in boundaryMesh to hold data on patches. is not used. Used in repatchMesh to hold data on patches.
SourceFiles SourceFiles
boundaryPatch.C repatchPatch.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef boundaryPatch_H #ifndef repatchPatch_H
#define boundaryPatch_H #define repatchPatch_H
#include "patchIdentifier.H" #include "patchIdentifier.H"
#include "autoPtr.H" #include "autoPtr.H"
@ -46,16 +46,16 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class boundaryPatch; class repatchPatch;
Ostream& operator<<(Ostream&, const boundaryPatch&); Ostream& operator<<(Ostream&, const repatchPatch&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class boundaryPatch Declaration Class repatchPatch Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class boundaryPatch class repatchPatch
: :
public patchIdentifier public patchIdentifier
{ {
@ -69,7 +69,7 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
boundaryPatch repatchPatch
( (
const word& name, const word& name,
const label index, const label index,
@ -79,7 +79,7 @@ public:
); );
//- Construct from dictionary //- Construct from dictionary
boundaryPatch repatchPatch
( (
const word& name, const word& name,
const dictionary& dict, const dictionary& dict,
@ -87,14 +87,14 @@ public:
); );
//- Copy constructor, resetting the index //- Copy constructor, resetting the index
boundaryPatch(const boundaryPatch&, const label index); repatchPatch(const repatchPatch&, const label index);
//- Clone //- Clone
autoPtr<boundaryPatch> clone() const; autoPtr<repatchPatch> clone() const;
//- Destructor //- Destructor
~boundaryPatch(); ~repatchPatch();
// Member Functions // Member Functions
@ -126,7 +126,7 @@ public:
// Ostream Operator // Ostream Operator
friend Ostream& operator<<(Ostream&, const boundaryPatch&); friend Ostream& operator<<(Ostream&, const repatchPatch&);
}; };