patchZones.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-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::patchZones
28
29Description
30 Calculates zone number for every face of patch.
31
32 Gets constructed from patch and is a labeList with zone number for
33 every patch face.
34
35SourceFiles
36 patchZones.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef patchZones_H
41#define patchZones_H
42
43#include "labelList.H"
44#include "pointField.H"
45#include "polyPatch.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class patchZones Declaration
54\*---------------------------------------------------------------------------*/
56class patchZones
57:
58 public labelList
59{
60 // Private data
61
62 //- Reference to patch
63 const primitivePatch& pp_;
64
65 //- Reference to protected edges
66 const boolList& borderEdge_;
67
68 //- Max number of zones
69 label nZones_;
70
71
72 // Private Member Functions
73
74 //- Gets labels of changed faces and propagates them to the edges.
75 // Returns labels of edges changed. Does not cross edges marked in
76 // regionEdge
77 labelList faceToEdge
78 (
79 const labelList& changedFaces,
80 labelList& edgeRegion
81 );
82
83 //- Reverse of faceToEdge: gets edges and returns faces
84 labelList edgeToFace(const labelList& changedEdges);
85
86 //- Fill *this with current zone for every face reachable
87 // from facei without crossing edge marked in borderEdge.
88 void markZone(label facei);
89
90public:
92 ClassName("patchZones");
93
94
95 // Constructors
96
97 //- Fills *this with zone of face. Zone is area
98 // reachable by edge crossing without crossing borderEdge
99 // (bool for every edge in patch).
100 patchZones(const primitivePatch& pp, const boolList& borderEdge);
101
102
103 // Member Functions
104
105 //- Number of zones
106 label nZones() const
107 {
108 return nZones_;
109 }
110
111};
112
113
114// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115
116} // End namespace Foam
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120#endif
121
122// ************************************************************************* //
A list of faces which address into the list of points.
Calculates zone number for every face of patch.
Definition: patchZones.H:58
label nZones() const
Number of zones.
Definition: patchZones.H:105
ClassName("patchZones")
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
Namespace for OpenFOAM.