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::geometricSurfacePatch 00026 00027 Description 00028 The geometricSurfacePatch is like patchIdentifier but for surfaces. 00029 Holds type, name and index. 00030 00031 SourceFiles 00032 geometricSurfacePatch.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef geometricSurfacePatch_H 00037 #define geometricSurfacePatch_H 00038 00039 #include <OpenFOAM/word.H> 00040 #include <OpenFOAM/label.H> 00041 #include <OpenFOAM/typeInfo.H> 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 class dictionary; 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class geometricSurfacePatch Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class geometricSurfacePatch 00055 { 00056 // Private data 00057 00058 //- Type name of patch 00059 word geometricType_; 00060 00061 //- Name of patch 00062 word name_; 00063 00064 //- Index of patch in boundary 00065 label index_; 00066 00067 public: 00068 00069 //- Runtime type information 00070 ClassName("geometricSurfacePatch"); 00071 00072 00073 // Constructors 00074 00075 //- Construct null 00076 geometricSurfacePatch(); 00077 00078 //- Construct from components 00079 geometricSurfacePatch 00080 ( 00081 const word& geometricType, 00082 const word& name, 00083 const label index 00084 ); 00085 00086 //- Construct from Istream 00087 geometricSurfacePatch(Istream&, const label index); 00088 00089 //- Construct from dictionary 00090 geometricSurfacePatch 00091 ( 00092 const word& name, 00093 const dictionary& dict, 00094 const label index 00095 ); 00096 00097 00098 // Member Functions 00099 00100 //- Return name 00101 const word& name() const 00102 { 00103 return name_; 00104 } 00105 00106 //- Return name 00107 word& name() 00108 { 00109 return name_; 00110 } 00111 00112 //- Return the type of the patch 00113 const word& geometricType() const 00114 { 00115 return geometricType_; 00116 } 00117 00118 //- Return the type of the patch 00119 word& geometricType() 00120 { 00121 return geometricType_; 00122 } 00123 00124 //- Return the index of this patch in the boundaryMesh 00125 label index() const 00126 { 00127 return index_; 00128 } 00129 00130 //- Return the index of this patch in the boundaryMesh 00131 label& index() 00132 { 00133 return index_; 00134 } 00135 00136 //- Write 00137 void write(Ostream&) const; 00138 00139 //- Write dictionary 00140 void writeDict(Ostream&) const; 00141 00142 00143 // Member Operators 00144 00145 bool operator!=(const geometricSurfacePatch&) const; 00146 00147 //- compare. 00148 bool operator==(const geometricSurfacePatch&) const; 00149 00150 00151 // Ostream Operator 00152 00153 friend Ostream& operator<<(Ostream&, const geometricSurfacePatch&); 00154 friend Istream& operator>>(Istream&, geometricSurfacePatch&); 00155 }; 00156 00157 00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00159 00160 } // End namespace Foam 00161 00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00163 00164 #endif 00165 00166 // ************************ vim: set sw=4 sts=4 et: ************************ //