mergePolyMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::mergePolyMesh
26 
27 Description
28  Add a given mesh to the original mesh to create a single new mesh
29 
30 SourceFiles
31  mergePolyMesh.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef mergePolyMesh_H
36 #define mergePolyMesh_H
37 
38 #include "polyMesh.H"
39 #include "polyTopoChange.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward declaration of classes
47 
48 /*---------------------------------------------------------------------------*\
49  Class mergePolyMesh Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class mergePolyMesh
53 :
54  public polyMesh
55 {
56  // Private Data
57 
58  //- Topological change to accumulated all mesh changes
59  polyTopoChange meshMod_;
60 
61  //- Patch names
62  DynamicList<word> patchNames_;
63 
64  //- Patch dictionaries
65  DynamicList<dictionary> patchDicts_;
66 
67  //- Point zone names
68  DynamicList<word> pointZoneNames_;
69 
70  //- Face zone names
71  DynamicList<word> faceZoneNames_;
72 
73  //- Cell zone names
74  DynamicList<word> cellZoneNames_;
75 
76 
77  // Private Member Functions
78 
79  //- Return patch index given a name and type
80  label patchIndex(const polyPatch&);
81 
82  //- Return zone index given a list of active zones and a name
83  label zoneIndex(DynamicList<word>&, const word&);
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("mergePolyMesh");
90 
91 
92  // Constructors
93 
94  //- Construct from IOobject
95  mergePolyMesh(const IOobject& io);
96 
97  //- Disallow default bitwise copy construction
98  mergePolyMesh(const mergePolyMesh&) = delete;
99 
100 
101  //- Destructor
102  virtual ~mergePolyMesh()
103  {}
104 
105 
106  // Member Functions
107 
108  //- Add a mesh
109  void addMesh(const polyMesh& m);
110 
111  //- Merge meshes
112  void merge();
113 
114 
115  // Member Operators
116 
117  //- Disallow default bitwise assignment
118  void operator=(const mergePolyMesh&) = delete;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
mergePolyMesh(const IOobject &io)
Construct from IOobject.
Add a given mesh to the original mesh to create a single new mesh.
Definition: mergePolyMesh.H:51
void addMesh(const polyMesh &m)
Add a mesh.
A class for handling words, derived from string.
Definition: word.H:59
void merge()
Merge meshes.
void operator=(const mergePolyMesh &)=delete
Disallow default bitwise assignment.
TypeName("mergePolyMesh")
Runtime type information.
Direct mesh changes based on v1.3 polyTopoChange syntax.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
virtual ~mergePolyMesh()
Destructor.
Namespace for OpenFOAM.