00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::surfacePatch 00026 00027 Description 00028 'Patch' on surface as subset of triSurface. 00029 00030 SourceFiles 00031 surfacePatch.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef surfacePatch_H 00036 #define surfacePatch_H 00037 00038 #include <triSurface/geometricSurfacePatch.H> 00039 #include <OpenFOAM/word.H> 00040 #include <OpenFOAM/label.H> 00041 #include <OpenFOAM/className.H> 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class surfacePatch Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class surfacePatch 00053 : 00054 public geometricSurfacePatch 00055 { 00056 // Private data 00057 00058 //- size of this patch in the triSurface face list 00059 label size_; 00060 00061 //- Start label of this patch in the triSurface face list 00062 label start_; 00063 00064 public: 00065 00066 //- Runtime type information 00067 ClassName("surfacePatch"); 00068 00069 00070 // Constructors 00071 00072 //- Construct null 00073 surfacePatch(); 00074 00075 //- Construct from components 00076 surfacePatch 00077 ( 00078 const word& geometricType, 00079 const word& name, 00080 const label size, 00081 const label start, 00082 const label index 00083 ); 00084 00085 //- Construct from Istream 00086 surfacePatch(Istream& is, const label index); 00087 00088 //- Construct from dictionary 00089 surfacePatch 00090 ( 00091 const word& name, 00092 const dictionary& dict, 00093 const label index 00094 ); 00095 00096 //- Construct as copy 00097 surfacePatch(const surfacePatch&); 00098 00099 00100 // Member Functions 00101 00102 //- Return start label of this patch in the polyMesh face list 00103 label start() const 00104 { 00105 return start_; 00106 } 00107 00108 //- Return start label of this patch in the polyMesh face list 00109 label& start() 00110 { 00111 return start_; 00112 } 00113 00114 //- Return size of this patch in the polyMesh face list 00115 label size() const 00116 { 00117 return size_; 00118 } 00119 00120 //- Return size of this patch in the polyMesh face list 00121 label& size() 00122 { 00123 return size_; 00124 } 00125 00126 //- Write 00127 void write(Ostream&) const; 00128 00129 //- Write dictionary 00130 void writeDict(Ostream&) const; 00131 00132 00133 // Member Operators 00134 00135 bool operator!=(const surfacePatch&) const; 00136 00137 //- compare. 00138 bool operator==(const surfacePatch&) const; 00139 00140 // IOstream Operators 00141 00142 friend Ostream& operator<<(Ostream&, const surfacePatch&); 00143 }; 00144 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 } // End namespace Foam 00149 00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00151 00152 #endif 00153 00154 // ************************ vim: set sw=4 sts=4 et: ************************ //