|
|
|
wedgePolyPatch.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::wedgePolyPatch 00027 00028 Description 00029 Wedge front and back plane patch. 00030 00031 SourceFiles 00032 wedgePolyPatch.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef wedgePolyPatch_H 00037 #define wedgePolyPatch_H 00038 00039 #include "polyPatch.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class wedgePolyPatch Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 class wedgePolyPatch 00051 : 00052 public polyPatch 00053 { 00054 // Private data 00055 00056 //- Axis of the wedge 00057 vector axis_; 00058 00059 //- Centre normal between the wedge boundaries 00060 vector centreNormal_; 00061 00062 //- Normal to the patch 00063 vector patchNormal_; 00064 00065 //- Face transformation tensor 00066 tensor faceT_; 00067 00068 //- Neighbour-cell transformation tensor 00069 tensor cellT_; 00070 00071 //- Calculate the above tensors 00072 void initTransforms(); 00073 00074 00075 public: 00076 00077 //- Runtime type information 00078 TypeName("wedge"); 00079 00080 00081 // Constructors 00082 00083 //- Construct from components 00084 wedgePolyPatch 00085 ( 00086 const word& name, 00087 const label size, 00088 const label start, 00089 const label index, 00090 const polyBoundaryMesh& bm 00091 ); 00092 00093 //- Construct from dictionary 00094 wedgePolyPatch 00095 ( 00096 const word& name, 00097 const dictionary& dict, 00098 const label index, 00099 const polyBoundaryMesh& bm 00100 ); 00101 00102 //- Construct as copy, resetting the boundary mesh 00103 wedgePolyPatch(const wedgePolyPatch&, const polyBoundaryMesh&); 00104 00105 //- Construct given the original patch and resetting the 00106 // face list and boundary mesh information 00107 wedgePolyPatch 00108 ( 00109 const wedgePolyPatch& pp, 00110 const polyBoundaryMesh& bm, 00111 const label index, 00112 const label newSize, 00113 const label newStart 00114 ); 00115 00116 //- Construct and return a clone, resetting the boundary mesh 00117 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const 00118 { 00119 return autoPtr<polyPatch>(new wedgePolyPatch(*this, bm)); 00120 } 00121 00122 //- Construct and return a clone, resetting the face list 00123 // and boundary mesh 00124 virtual autoPtr<polyPatch> clone 00125 ( 00126 const polyBoundaryMesh& bm, 00127 const label index, 00128 const label newSize, 00129 const label newStart 00130 ) const 00131 { 00132 return autoPtr<polyPatch> 00133 ( 00134 new wedgePolyPatch(*this, bm, index, newSize, newStart) 00135 ); 00136 } 00137 00138 00139 // Member functions 00140 00141 // Access 00142 00143 //- Return axis of the wedge 00144 const vector& axis() const 00145 { 00146 return axis_; 00147 } 00148 00149 //- Return plane normal between the wedge boundaries 00150 const vector& centreNormal() const 00151 { 00152 return centreNormal_; 00153 } 00154 00155 //- Return the normal to the patch 00156 const vector& patchNormal() const 00157 { 00158 return patchNormal_; 00159 } 00160 00161 //- Return face transformation tensor 00162 const tensor& faceT() const 00163 { 00164 return faceT_; 00165 } 00166 00167 //- Return neighbour-cell transformation tensor 00168 const tensor& cellT() const 00169 { 00170 return cellT_; 00171 } 00172 }; 00173 00174 00175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00176 00177 } // End namespace Foam 00178 00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00180 00181 #endif 00182 00183 // ************************************************************************* // |