|
|
|
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-2007 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 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. Looking at the 00031 creation of the faces on both sides of the processor patch they 00032 need to be identical on both sides with the normals pointing in 00033 opposite directions. This is achieved by calling the reverseFace 00034 function in the decomposition. It is therefore possible to 00035 re-create the ordering of patch points on the slave side by 00036 reversing all the patch faces of the owner. 00037 00038 SourceFiles 00039 processorPointPatch.C 00040 00041 \*---------------------------------------------------------------------------*/ 00042 00043 #ifndef processorPointPatch_H 00044 #define processorPointPatch_H 00045 00046 #include "coupledFacePointPatch.H" 00047 #include "processorPolyPatch.H" 00048 00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00050 00051 namespace Foam 00052 { 00053 00054 /*---------------------------------------------------------------------------*\ 00055 Class processorPointPatch Declaration 00056 \*---------------------------------------------------------------------------*/ 00057 00058 class processorPointPatch 00059 : 00060 public coupledFacePointPatch 00061 { 00062 // Private data 00063 00064 const processorPolyPatch& procPolyPatch_; 00065 00066 00067 // Private Member Functions 00068 00069 //- Disallow default construct as copy 00070 processorPointPatch(const processorPointPatch&); 00071 00072 //- Disallow default assignment 00073 void operator=(const processorPointPatch&); 00074 00075 00076 // Construction of demand-driven data 00077 00078 //- Calculate mesh points 00079 virtual void calcMeshPoints() const; 00080 00081 00082 public: 00083 00084 typedef coupledPointPatch CoupledPointPatch; 00085 typedef pointBoundaryMesh BoundaryMesh; 00086 00087 00088 //- Runtime type information 00089 TypeName(processorPolyPatch::typeName_()); 00090 00091 00092 // Constructors 00093 00094 //- Construct from components 00095 processorPointPatch 00096 ( 00097 const polyPatch& patch, 00098 const pointBoundaryMesh& bm 00099 ); 00100 00101 00102 // Destructor 00103 00104 virtual ~processorPointPatch(); 00105 00106 00107 // Member functions 00108 00109 //- Return true if running parallel 00110 virtual bool coupled() const 00111 { 00112 if (Pstream::parRun()) 00113 { 00114 return true; 00115 } 00116 else 00117 { 00118 return false; 00119 } 00120 } 00121 00122 //- Return processor number 00123 int myProcNo() const 00124 { 00125 return procPolyPatch_.myProcNo(); 00126 } 00127 00128 //- Return neigbour processor number 00129 int neighbProcNo() const 00130 { 00131 return procPolyPatch_.neighbProcNo(); 00132 } 00133 00134 //- Is this a master patch 00135 bool isMaster() const 00136 { 00137 return myProcNo() < neighbProcNo(); 00138 } 00139 00140 //- Is this a slave patch 00141 bool isSlave() const 00142 { 00143 return !isMaster(); 00144 } 00145 00146 //- Return the underlying processorPolyPatch 00147 const processorPolyPatch& procPolyPatch() const 00148 { 00149 return procPolyPatch_; 00150 } 00151 }; 00152 00153 00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00155 00156 } // End namespace Foam 00157 00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00159 00160 #endif 00161 00162 // ************************************************************************* // |