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