1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Calculates zone number for every face of patch.
31 Gets constructed from patch and is a labeList with zone number for
37 \*---------------------------------------------------------------------------*/
42 #include "labelList.H"
43 #include "pointField.H"
44 #include "polyPatch.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class patchZones Declaration
53 \*---------------------------------------------------------------------------*/
61 //- Reference to patch
62 const primitivePatch& pp_;
64 //- Reference to protected edges
65 const boolList& borderEdge_;
67 //- Max number of zones
71 // Private Member Functions
73 //- Gets labels of changed faces and propagates them to the edges.
74 // Returns labels of edges changed. Does not cross edges marked in
78 const labelList& changedFaces,
82 //- Reverse of faceToEdge: gets edges and returns faces
83 labelList edgeToFace(const labelList& changedEdges);
85 //- Fill *this with current zone for every face reachable
86 // from faceI without crossing edge marked in borderEdge.
87 void markZone(label faceI);
91 ClassName("patchZones");
96 //- Fills *this with zone of face. Zone is area
97 // reachable by edge crossing without crossing borderEdge
98 // (bool for every edge in patch).
99 patchZones(const primitivePatch& pp, const boolList& borderEdge);
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 } // End namespace Foam
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 // ************************************************************************* //