|
|
|
globalPointPatch.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::globalPointPatch 00027 00028 Description 00029 Foam::globalPointPatch 00030 00031 SourceFiles 00032 globalPointPatch.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef globalPointPatch_H 00037 #define globalPointPatch_H 00038 00039 #include "pointPatch.H" 00040 #include "coupledPointPatch.H" 00041 #include "globalMeshData.H" 00042 #include "pointMesh.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class globalPointPatch Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class globalPointPatch 00054 : 00055 public pointPatch, 00056 public coupledPointPatch 00057 { 00058 // Private data 00059 00060 // //- Reference to the basic globalMeshData 00061 // const globalMeshData& globalMeshData_; 00062 00063 //- Index in the boundary mesh 00064 label index_; 00065 00066 00067 // Protected Member Functions 00068 00069 //- Initialise the calculation of the patch geometry 00070 virtual void initGeometry() 00071 {} 00072 00073 //- Calculate the patch geometry 00074 virtual void calcGeometry() 00075 {} 00076 00077 //- Initialise the patches for moving points 00078 virtual void initMovePoints(const pointField&) 00079 {} 00080 00081 //- Correct patches after moving points 00082 virtual void movePoints(const pointField&) 00083 {} 00084 00085 //- Initialise the update of the patch topology 00086 virtual void initUpdateMesh() 00087 {} 00088 00089 //- Update of the patch topology 00090 virtual void updateMesh() 00091 {} 00092 00093 00094 // Private Member Functions 00095 00096 //- Disallow default construct as copy 00097 globalPointPatch 00098 ( 00099 const globalPointPatch& 00100 ); 00101 00102 //- Disallow default assignment 00103 void operator=(const globalPointPatch&); 00104 00105 00106 public: 00107 00108 //- Runtime type information 00109 TypeName("global"); 00110 00111 // Constructors 00112 00113 //- Construct from components 00114 globalPointPatch 00115 ( 00116 const pointBoundaryMesh&, 00117 const label index 00118 ); 00119 00120 00121 // Destructor 00122 00123 virtual ~globalPointPatch(); 00124 00125 00126 // Member functions 00127 00128 //- Return name 00129 virtual const word& name() const 00130 { 00131 // There can only be a single patch of this type - therefore 00132 // its name is hard-coded. 00133 return type(); 00134 } 00135 00136 //- Return size 00137 virtual label size() const 00138 { 00139 return meshPoints().size(); 00140 } 00141 00142 //- Return true if running parallel 00143 virtual bool coupled() const 00144 { 00145 if (Pstream::parRun()) 00146 { 00147 return true; 00148 } 00149 else 00150 { 00151 return false; 00152 } 00153 } 00154 00155 //- Return number of faces 00156 virtual label nFaces() const 00157 { 00158 return 0; 00159 } 00160 00161 //- Return the index of this patch in the pointBoundaryMesh 00162 virtual label index() const 00163 { 00164 return index_; 00165 } 00166 00167 //- Return mesh points 00168 virtual const labelList& meshPoints() const 00169 { 00170 return boundaryMesh().mesh().globalData().sharedPointLabels(); 00171 } 00172 00173 //- Return local points. Not implemented 00174 virtual const pointField& localPoints() const 00175 { 00176 notImplemented("globalPointPatch::localPoints() const"); 00177 return pointField::null(); 00178 } 00179 00180 //- Return point normals. Not implemented 00181 virtual const vectorField& pointNormals() const 00182 { 00183 notImplemented("globalPointPatch::pointNormals() const"); 00184 return vectorField::null(); 00185 } 00186 00187 //- Return total number of shared points 00188 virtual label globalPointSize() const 00189 { 00190 return boundaryMesh().mesh().globalData().nGlobalPoints(); 00191 } 00192 00193 //- Return addressing into the global points list 00194 const labelList& sharedPointAddr() const 00195 { 00196 return boundaryMesh().mesh().globalData().sharedPointAddr(); 00197 } 00198 }; 00199 00200 00201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00202 00203 } // End namespace Foam 00204 00205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00206 00207 #endif 00208 00209 // ************************************************************************* // |