1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 Calculates zone number for every face of patch.
30 Gets constructed from patch and is a labeList with zone number for
36 \*---------------------------------------------------------------------------*/
41 #include "labelList.H"
42 #include "pointField.H"
43 #include "polyPatch.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class patchZones Declaration
52 \*---------------------------------------------------------------------------*/
60 //- Reference to patch
61 const primitivePatch& pp_;
63 //- Reference to protected edges
64 const boolList& borderEdge_;
66 //- Max number of zones
70 // Private Member Functions
72 //- Gets labels of changed faces and propagates them to the edges.
73 // Returns labels of edges changed. Does not cross edges marked in
77 const labelList& changedFaces,
81 //- Reverse of faceToEdge: gets edges and returns faces
82 labelList edgeToFace(const labelList& changedEdges);
84 //- Fill *this with current zone for every face reachable
85 // from faceI without crossing edge marked in borderEdge.
86 void markZone(label faceI);
90 ClassName("patchZones");
95 //- Fills *this with zone of face. Zone is area
96 // reachable by edge crossing without crossing borderEdge
97 // (bool for every edge in patch).
98 patchZones(const primitivePatch& pp, const boolList& borderEdge);
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 } // End namespace Foam
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 // ************************************************************************* //