|
|
|
genericPolyPatch.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::genericPolyPatch 00027 00028 Description 00029 Determines a mapping between patch face centres and mesh cell centres and 00030 processors they're on. 00031 00032 Note 00033 Storage is not optimal. It stores all face centres and cells on all 00034 processors to keep the addressing calculation simple. 00035 00036 SourceFiles 00037 genericPolyPatch.C 00038 00039 \*---------------------------------------------------------------------------*/ 00040 00041 #ifndef genericPolyPatch_H 00042 #define genericPolyPatch_H 00043 00044 #include "polyPatch.H" 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 00051 /*---------------------------------------------------------------------------*\ 00052 Class genericPolyPatch Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 class genericPolyPatch 00056 : 00057 public polyPatch 00058 { 00059 // Private data 00060 00061 word actualTypeName_; 00062 dictionary dict_; 00063 00064 public: 00065 00066 //- Runtime type information 00067 TypeName("genericPatch"); 00068 00069 00070 // Constructors 00071 00072 //- Construct from components 00073 genericPolyPatch 00074 ( 00075 const word& name, 00076 const label size, 00077 const label start, 00078 const label index, 00079 const polyBoundaryMesh& bm 00080 ); 00081 00082 //- Construct from dictionary 00083 genericPolyPatch 00084 ( 00085 const word& name, 00086 const dictionary& dict, 00087 const label index, 00088 const polyBoundaryMesh& bm 00089 ); 00090 00091 //- Construct as copy, resetting the boundary mesh 00092 genericPolyPatch 00093 ( 00094 const genericPolyPatch&, 00095 const polyBoundaryMesh& 00096 ); 00097 00098 //- Construct given the original patch and resetting the 00099 // face list and boundary mesh information 00100 genericPolyPatch 00101 ( 00102 const genericPolyPatch& pp, 00103 const polyBoundaryMesh& bm, 00104 const label index, 00105 const label newSize, 00106 const label newStart 00107 ); 00108 00109 //- Construct and return a clone, resetting the boundary mesh 00110 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const 00111 { 00112 return autoPtr<polyPatch>(new genericPolyPatch(*this, bm)); 00113 } 00114 00115 //- Construct and return a clone, resetting the face list 00116 // and boundary mesh 00117 virtual autoPtr<polyPatch> clone 00118 ( 00119 const polyBoundaryMesh& bm, 00120 const label index, 00121 const label newSize, 00122 const label newStart 00123 ) const 00124 { 00125 return autoPtr<polyPatch> 00126 ( 00127 new genericPolyPatch(*this, bm, index, newSize, newStart) 00128 ); 00129 } 00130 00131 00132 // Destructor 00133 00134 ~genericPolyPatch(); 00135 00136 00137 // Member functions 00138 00139 //- Write the polyPatch data as a dictionary 00140 virtual void write(Ostream&) const; 00141 }; 00142 00143 00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00145 00146 } // End namespace Foam 00147 00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00149 00150 #endif 00151 00152 // ************************************************************************* // |