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