All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
repatchPolyTopoChanger.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-2020 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::repatchPolyTopoChanger
26 
27 Description
28  A mesh which allows changes in the patch distribution of the
29  boundary faces. The change in patching is set using changePatchID. For a
30  boundary face, a new patch ID is given.
31 
32 SourceFiles
33  repatchPolyTopoChanger.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef repatchPolyTopoChanger_H
38 #define repatchPolyTopoChanger_H
39 
40 #include "polyMesh.H"
41 #include "polyTopoChange.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class repatchPolyTopoChanger Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private Data
55 
56  //- The polyMesh to be repatched
57  polyMesh& mesh_;
58 
59  //- Topological change to accumulated all mesh changes
60  autoPtr<polyTopoChange> meshModPtr_;
61 
62 
63  // Private Member Functions
64 
65  //- Demand driven access to polyTopoChange
66  polyTopoChange& meshMod();
67 
68 
69 public:
70 
71  // Constructors
72 
73  //- Construct for given mesh
75 
76  //- Disallow default bitwise copy construction
78 
79 
80  //- Destructor
81  virtual ~repatchPolyTopoChanger()
82  {}
83 
84 
85  // Member Functions
86 
87  //- Change patches.
89 
90  //- Change patch ID for a boundary face. Note: patchID should be in new
91  // numbering.
92  void changePatchID
93  (
94  const label faceID,
95  const label patchID
96  );
97 
98  //- Set zone ID for a face
99  void setFaceZone
100  (
101  const label faceID,
102  const label zoneID,
103  const bool zoneFlip
104  );
105 
106  //- Change anchor point (zero'th point of face) for a boundary face.
107  void changeAnchorPoint
108  (
109  const label faceID,
110  const label fp
111  );
112 
113  //- Re-patch the mesh
114  void repatch();
115 
116 
117  // Member Operators
118 
119  //- Disallow default bitwise assignment
120  void operator=(const repatchPolyTopoChanger&) = delete;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
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
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
void setFaceZone(const label faceID, const label zoneID, const bool zoneFlip)
Set zone ID for a face.
patches[0]
virtual ~repatchPolyTopoChanger()
Destructor.
void changeAnchorPoint(const label faceID, const label fp)
Change anchor point (zero&#39;th point of face) for a boundary face.
void changePatchID(const label faceID, const label patchID)
Change patch ID for a boundary face. Note: patchID should be in new.
void repatch()
Re-patch the mesh.
dynamicFvMesh & mesh
A mesh which allows changes in the patch distribution of the boundary faces. The change in patching i...
void operator=(const repatchPolyTopoChanger &)=delete
Disallow default bitwise assignment.
void changePatches(const List< polyPatch *> &patches)
Change patches.
Direct mesh changes based on v1.3 polyTopoChange syntax.
repatchPolyTopoChanger(polyMesh &mesh)
Construct for given mesh.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Namespace for OpenFOAM.