|
|
|
processorPointPatch.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::processorPointPatch 00027 00028 Description 00029 Processor patch boundary needs to be such that the ordering of 00030 points in the patch is the same on both sides. 00031 00032 Looking at the creation of the faces on both sides of the processor 00033 patch they need to be identical on both sides with the normals pointing 00034 in opposite directions. This is achieved by calling the reverseFace 00035 function in the decomposition. It is therefore possible to re-create 00036 the ordering of patch points on the slave side by reversing all the 00037 patch faces of the owner. 00038 00039 SourceFiles 00040 processorPointPatch.C 00041 00042 \*---------------------------------------------------------------------------*/ 00043 00044 #ifndef processorPointPatch_H 00045 #define processorPointPatch_H 00046 00047 #include "coupledFacePointPatch.H" 00048 #include "processorPolyPatch.H" 00049 00050 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00051 00052 namespace Foam 00053 { 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class processorPointPatch Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class processorPointPatch 00060 : 00061 public coupledFacePointPatch 00062 { 00063 // Private data 00064 00065 const processorPolyPatch& procPolyPatch_; 00066 00067 00068 // Private Member Functions 00069 00070 //- Initialise the calculation of the patch geometry 00071 virtual void initGeometry(); 00072 00073 //- Calculate the patch geometry 00074 virtual void calcGeometry(); 00075 00076 //- Initialise the points on this patch which are should also be 00077 // on a neighbouring patch but are not part of faces of that patch 00078 void initPatchPatchPoints(); 00079 00080 //- Calculate the points on this patch which are should also be 00081 // on a neighbouring patch but are not part of faces of that patch 00082 void calcPatchPatchPoints(); 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 //- Disallow default construct as copy 00098 processorPointPatch(const processorPointPatch&); 00099 00100 //- Disallow default assignment 00101 void operator=(const processorPointPatch&); 00102 00103 public: 00104 00105 //- Runtime type information 00106 TypeName(processorPolyPatch::typeName_()); 00107 00108 00109 // Constructors 00110 00111 //- Construct from components 00112 processorPointPatch 00113 ( 00114 const polyPatch& patch, 00115 const pointBoundaryMesh& bm 00116 ); 00117 00118 00119 // Destructor 00120 00121 virtual ~processorPointPatch(); 00122 00123 00124 // Member functions 00125 00126 //- Return true if running parallel 00127 virtual bool coupled() const 00128 { 00129 if (Pstream::parRun()) 00130 { 00131 return true; 00132 } 00133 else 00134 { 00135 return false; 00136 } 00137 } 00138 00139 //- Return processor number 00140 int myProcNo() const 00141 { 00142 return procPolyPatch_.myProcNo(); 00143 } 00144 00145 //- Return neigbour processor number 00146 int neighbProcNo() const 00147 { 00148 return procPolyPatch_.neighbProcNo(); 00149 } 00150 00151 //- Is this a master patch 00152 bool isMaster() const 00153 { 00154 return myProcNo() < neighbProcNo(); 00155 } 00156 00157 //- Is this a slave patch 00158 bool isSlave() const 00159 { 00160 return !isMaster(); 00161 } 00162 00163 //- Return the underlying processorPolyPatch 00164 const processorPolyPatch& procPolyPatch() const 00165 { 00166 return procPolyPatch_; 00167 } 00168 }; 00169 00170 00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00172 00173 } // End namespace Foam 00174 00175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00176 00177 #endif 00178 00179 // ************************************************************************* // |