|
|
|
boundaryRegion.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::boundaryRegion 00027 00028 Description 00029 The boundaryRegion persistent data saved as a Map<dictionary>. 00030 00031 The meshReader supports boundaryRegion information. 00032 00033 The <tt>constant/boundaryRegion</tt> file is an @c IOMap<dictionary> 00034 that is used to save the information persistently. 00035 It contains the boundaryRegion information of the following form: 00036 00037 @verbatim 00038 ( 00039 INT 00040 { 00041 BoundaryType WORD; 00042 Label WORD; 00043 } 00044 ... 00045 ) 00046 @endverbatim 00047 00048 SourceFiles 00049 boundaryRegion.C 00050 00051 \*---------------------------------------------------------------------------*/ 00052 00053 #ifndef boundaryRegion_H 00054 #define boundaryRegion_H 00055 00056 #include "polyMesh.H" 00057 #include "Map.H" 00058 #include "dictionary.H" 00059 #include "labelList.H" 00060 #include "wordList.H" 00061 #include "wordReList.H" 00062 00063 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00064 00065 namespace Foam 00066 { 00067 00068 /*---------------------------------------------------------------------------*\ 00069 Class boundaryRegion Declaration 00070 \*---------------------------------------------------------------------------*/ 00071 00072 class boundaryRegion 00073 : 00074 public Map<dictionary> 00075 { 00076 // Private Member Functions 00077 00078 //- Disallow default bitwise copy construct 00079 boundaryRegion(const boundaryRegion&); 00080 00081 00082 public: 00083 00084 // Constructors 00085 00086 //- Construct null 00087 boundaryRegion(); 00088 00089 //- Construct read from registry, name. instance 00090 boundaryRegion 00091 ( 00092 const objectRegistry&, 00093 const word& name = "boundaryRegion", 00094 const fileName& instance = "constant" 00095 ); 00096 00097 00098 //- Destructor 00099 ~boundaryRegion(); 00100 00101 00102 // Member Functions 00103 00104 //- Append to the end, return index 00105 label append(const dictionary&); 00106 00107 //- Return index corresponding to patch 'name' 00108 // returns -1 if not found 00109 label findIndex(const word& name) const; 00110 00111 //- Return a Map of (id => name) 00112 Map<word> names() const; 00113 00114 //- Return a Map of (id => names) selected by patterns 00115 Map<word> names(const List<wordRe>& patterns) const; 00116 00117 //- Return a Map of (id => type) 00118 Map<word> boundaryTypes() const; 00119 00120 //- Return BoundaryType corresponding to patch 'name' 00121 word boundaryType(const word& name) const; 00122 00123 //- Read constant/boundaryRegion 00124 void readDict 00125 ( 00126 const objectRegistry&, 00127 const word& name = "boundaryRegion", 00128 const fileName& instance = "constant" 00129 ); 00130 00131 //- Write constant/boundaryRegion for later reuse 00132 void writeDict 00133 ( 00134 const objectRegistry&, 00135 const word& name = "boundaryRegion", 00136 const fileName& instance = "constant" 00137 ) const; 00138 00139 00140 // Member Operators 00141 00142 //- Assignment 00143 void operator=(const boundaryRegion&); 00144 00145 //- Assign from Map<dictionary> 00146 void operator=(const Map<dictionary>&); 00147 00148 00149 // Friend Functions 00150 00151 //- Rename regions 00152 // each dictionary entry is a single word: 00153 // @verbatim 00154 // newPatchName originalName; 00155 // @endverbatim 00156 void rename(const dictionary&); 00157 }; 00158 00159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00160 00161 } // End namespace Foam 00162 00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00164 00165 #endif 00166 00167 // ************************************************************************* // |