|
|
|
facePointPatch.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::facePointPatch 00027 00028 Description 00029 A pointPatch based on a polyPatch 00030 00031 SourceFiles 00032 facePointPatch.C 00033 facePointPatchM.C 00034 newPointPatch.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef facePointPatch_H 00039 #define facePointPatch_H 00040 00041 #include "pointPatch.H" 00042 #include "polyPatch.H" 00043 #include "autoPtr.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 class processorPointPatch; 00051 class cyclicPointPatch; 00052 00053 /*---------------------------------------------------------------------------*\ 00054 Class facePointPatch Declaration 00055 \*---------------------------------------------------------------------------*/ 00056 00057 class facePointPatch 00058 : 00059 public pointPatch 00060 { 00061 protected: 00062 00063 // Protected data 00064 00065 //- Reference to the underlying polyPatch 00066 const polyPatch& polyPatch_; 00067 00068 // Optional data used if the pointPatch has points not associated 00069 // with faces, i.e. not accessible via polyPatch 00070 00071 mutable labelList meshPoints_; 00072 mutable pointField localPoints_; 00073 mutable vectorField pointNormals_; 00074 00075 00076 // Protected Member Functions 00077 00078 //- Initialise the calculation of the patch geometry 00079 virtual void initGeometry(); 00080 00081 //- Calculate the patch geometry 00082 virtual void calcGeometry(); 00083 00084 //- Initialise the patches for moving points 00085 virtual void initMovePoints(const pointField&); 00086 00087 //- Correct patches after moving points 00088 virtual void movePoints(const pointField&); 00089 00090 //- Initialise the update of the patch topology 00091 virtual void initUpdateMesh(); 00092 00093 //- Update of the patch topology 00094 virtual void updateMesh(); 00095 00096 00097 private: 00098 00099 // Private Member Functions 00100 00101 //- Disallow default bitwise copy construct 00102 facePointPatch(const facePointPatch&); 00103 00104 //- Disallow default bitwise assignment 00105 void operator=(const facePointPatch&); 00106 00107 00108 public: 00109 00110 // Declare friendship with the coupledPointPatches to allow them to extend 00111 // the set of points with those not associated with faces 00112 friend class processorPointPatch; 00113 friend class cyclicPointPatch; 00114 00115 00116 //- Runtime type information 00117 TypeName(polyPatch::typeName_()); 00118 00119 00120 // Declare run-time constructor selection tables 00121 00122 declareRunTimeSelectionTable 00123 ( 00124 autoPtr, 00125 facePointPatch, 00126 polyPatch, 00127 (const polyPatch& patch, const pointBoundaryMesh& bm), 00128 (patch, bm) 00129 ); 00130 00131 00132 // Constructors 00133 00134 //- Construct from polyPatch 00135 facePointPatch 00136 ( 00137 const polyPatch&, 00138 const pointBoundaryMesh& 00139 ); 00140 00141 00142 // Selectors 00143 00144 //- Return a pointer to a new patch created on freestore from polyPatch 00145 static autoPtr<facePointPatch> New 00146 ( 00147 const polyPatch&, 00148 const pointBoundaryMesh& 00149 ); 00150 00151 00152 // Destructor 00153 00154 virtual ~facePointPatch() 00155 {} 00156 00157 00158 // Member Functions 00159 00160 //- Return the polyPatch 00161 const polyPatch& patch() const 00162 { 00163 return polyPatch_; 00164 } 00165 00166 //- Return name 00167 virtual const word& name() const 00168 { 00169 return polyPatch_.name(); 00170 } 00171 00172 //- Return size 00173 virtual label size() const 00174 { 00175 return meshPoints().size(); 00176 } 00177 00178 //- Return the index of this patch in the pointBoundaryMesh 00179 virtual label index() const 00180 { 00181 return polyPatch_.index(); 00182 } 00183 00184 //- Return mesh points 00185 virtual const labelList& meshPoints() const; 00186 00187 //- Return pointField of points in patch 00188 virtual const pointField& localPoints() const; 00189 00190 //- Return point unit normals 00191 virtual const vectorField& pointNormals() const; 00192 }; 00193 00194 00195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00196 00197 } // End namespace Foam 00198 00199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00200 00201 #endif 00202 00203 // ************************************************************************* // |