|
|
|
patchZones.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 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 Foam::patchZones 00027 00028 Description 00029 Calculates zone number for every face of patch. 00030 00031 Gets constructed from patch and is a labeList with zone number for 00032 every patch face. 00033 00034 SourceFiles 00035 patchZones.C 00036 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef patchZones_H 00040 #define patchZones_H 00041 00042 #include "labelList.H" 00043 #include "pointField.H" 00044 #include "polyPatch.H" 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 00051 /*---------------------------------------------------------------------------*\ 00052 Class patchZones Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 class patchZones 00056 : 00057 public labelList 00058 { 00059 // Private data 00060 00061 //- Reference to patch 00062 const primitivePatch& pp_; 00063 00064 //- Reference to protected edges 00065 const boolList& borderEdge_; 00066 00067 //- Max number of zones 00068 label nZones_; 00069 00070 00071 // Private Member Functions 00072 00073 //- Gets labels of changed faces and propagates them to the edges. 00074 // Returns labels of edges changed. Does not cross edges marked in 00075 // regionEdge 00076 labelList faceToEdge 00077 ( 00078 const labelList& changedFaces, 00079 labelList& edgeRegion 00080 ); 00081 00082 //- Reverse of faceToEdge: gets edges and returns faces 00083 labelList edgeToFace(const labelList& changedEdges); 00084 00085 //- Fill *this with current zone for every face reachable 00086 // from faceI without crossing edge marked in borderEdge. 00087 void markZone(label faceI); 00088 00089 public: 00090 00091 ClassName("patchZones"); 00092 00093 00094 // Constructors 00095 00096 //- Fills *this with zone of face. Zone is area 00097 // reachable by edge crossing without crossing borderEdge 00098 // (bool for every edge in patch). 00099 patchZones(const primitivePatch& pp, const boolList& borderEdge); 00100 00101 00102 // Member Functions 00103 00104 //- Number of zones 00105 label nZones() const 00106 { 00107 return nZones_; 00108 } 00109 00110 }; 00111 00112 00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00114 00115 } // End namespace Foam 00116 00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00118 00119 #endif 00120 00121 // ************************************************************************* // |