![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 patchZones 00027 00028 Description 00029 Calculates zone number for every face of patch. Gets constructed from 00030 patch and is a labeList with zone number for every patch face. 00031 00032 SourceFiles 00033 patchZones.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef patchZones_H 00038 #define patchZones_H 00039 00040 #include "labelList.H" 00041 #include "pointField.H" 00042 #include "polyPatch.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class patchZones Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class patchZones 00054 : 00055 public labelList 00056 { 00057 // Private data 00058 00059 //- Reference to patch 00060 const primitivePatch& pp_; 00061 00062 //- Reference to protected edges 00063 const boolList& borderEdge_; 00064 00065 //- Max number of zones 00066 label nZones_; 00067 00068 00069 // Private Member Functions 00070 00071 //- Gets labels of changed faces and propagates them to the edges. 00072 // Returns labels of edges changed. Does not cross edges marked in 00073 // regionEdge 00074 labelList faceToEdge 00075 ( 00076 const labelList& changedFaces, 00077 labelList& edgeRegion 00078 ); 00079 00080 //- Reverse of faceToEdge: gets edges and returns faces 00081 labelList edgeToFace(const labelList& changedEdges); 00082 00083 //- Fill *this with current zone for every face reachable 00084 // from faceI without crossing edge marked in borderEdge. 00085 void markZone(label faceI); 00086 00087 public: 00088 00089 ClassName("patchZones"); 00090 00091 00092 // Constructors 00093 00094 //- Fills *this with zone of face. Zone is area 00095 // reachable by edge crossing without crossing borderEdge 00096 // (bool for every edge in patch). 00097 patchZones(const primitivePatch& pp, const boolList& borderEdge); 00098 00099 00100 // Member Functions 00101 00102 //- Number of zones 00103 label nZones() const 00104 { 00105 return nZones_; 00106 } 00107 00108 }; 00109 00110 00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00112 00113 } // End namespace Foam 00114 00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00116 00117 #endif 00118 00119 // ************************************************************************* //