![]() |
|
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 boundaryPatch 00027 00028 Description 00029 Like polyPatch but without reference to mesh. patchIdentifier::index 00030 is not used. Used in boundaryMesh to hold data on patches. 00031 00032 SourceFiles 00033 boundaryPatch.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef boundaryPatch_H 00038 #define boundaryPatch_H 00039 00040 #include "patchIdentifier.H" 00041 #include "autoPtr.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 // Class forward declarations 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class boundaryPatch Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class boundaryPatch 00055 : 00056 public patchIdentifier 00057 { 00058 // Private data 00059 00060 label size_; 00061 00062 label start_; 00063 00064 public: 00065 00066 // Constructors 00067 00068 //- Construct from components 00069 boundaryPatch 00070 ( 00071 const word& name, 00072 const label index, 00073 const label size, 00074 const label start, 00075 const word& physicalType = word::null 00076 ); 00077 00078 //- Construct from Istream 00079 boundaryPatch(Istream&, const label index); 00080 00081 //- Construct from dictionary 00082 boundaryPatch 00083 ( 00084 const word& name, 00085 const dictionary& dict, 00086 const label index 00087 ); 00088 00089 //- Construct as copy 00090 boundaryPatch(const boundaryPatch&); 00091 00092 //- Clone 00093 autoPtr<boundaryPatch> clone() const; 00094 00095 00096 // Destructor 00097 00098 ~boundaryPatch(); 00099 00100 00101 // Member Functions 00102 00103 label size() const 00104 { 00105 return size_; 00106 } 00107 00108 label& size() 00109 { 00110 return size_; 00111 } 00112 00113 label start() const 00114 { 00115 return start_; 00116 } 00117 00118 label& start() 00119 { 00120 return start_; 00121 } 00122 00123 //- Write 00124 void write(Ostream&) const; 00125 00126 //- Write dictionary 00127 void writeDict(Ostream&) const; 00128 00129 00130 // Ostream Operator 00131 00132 friend Ostream& operator<<(Ostream&, const boundaryPatch&); 00133 }; 00134 00135 00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00137 00138 } // End namespace Foam 00139 00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00141 00142 #endif 00143 00144 // ************************************************************************* //