repatchPolyTopoChanger.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 | Copyright (C) 2011 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  //- Disallow default bitwise copy construct
70 
71  //- Disallow default bitwise assignment
72  void operator=(const repatchPolyTopoChanger&);
73 
74 
75 public:
76 
77  // Constructors
78 
79  //- Construct for given mesh
81 
82 
83  //- Destructor
84  virtual ~repatchPolyTopoChanger()
85  {}
86 
87 
88  // Member Functions
89 
90  //- Change patches.
92 
93  //- Change patch ID for a boundary face. Note: patchID should be in new
94  // numbering.
95  void changePatchID
96  (
97  const label faceID,
98  const label patchID
99  );
100 
101  //- Set zone ID for a face
102  void setFaceZone
103  (
104  const label faceID,
105  const label zoneID,
106  const bool zoneFlip
107  );
108 
109  //- Change anchor point (zero'th point of face) for a boundary face.
110  void changeAnchorPoint
111  (
112  const label faceID,
113  const label fp
114  );
115 
116 
117  //- Re-patch the mesh
118  void repatch();
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
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:60
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 changePatches(const List< polyPatch *> &patches)
Change patches.
Direct mesh changes based on v1.3 polyTopoChange syntax.
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.