|
|
|
processorFvPatch.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::processorFvPatch 00027 00028 Description 00029 Processor patch. 00030 00031 SourceFiles 00032 processorFvPatch.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef processorFvPatch_H 00037 #define processorFvPatch_H 00038 00039 #include "coupledFvPatch.H" 00040 #include "processorLduInterface.H" 00041 #include "processorPolyPatch.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class processorFvPatch Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class processorFvPatch 00053 : 00054 public coupledFvPatch, 00055 public processorLduInterface 00056 { 00057 // Private Data 00058 00059 const processorPolyPatch& procPolyPatch_; 00060 00061 00062 protected: 00063 00064 // Protected Member functions 00065 00066 //- Make patch weighting factors 00067 void makeWeights(scalarField&) const; 00068 00069 //- Make patch face - neighbour cell distances 00070 void makeDeltaCoeffs(scalarField&) const; 00071 00072 00073 public: 00074 00075 //- Runtime type information 00076 TypeName(processorPolyPatch::typeName_()); 00077 00078 00079 // Constructors 00080 00081 //- Construct from components 00082 processorFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm) 00083 : 00084 coupledFvPatch(patch, bm), 00085 procPolyPatch_(refCast<const processorPolyPatch>(patch)) 00086 {} 00087 00088 00089 // Member functions 00090 00091 //- Return processor number 00092 int myProcNo() const 00093 { 00094 return procPolyPatch_.myProcNo(); 00095 } 00096 00097 //- Return neigbour processor number 00098 int neighbProcNo() const 00099 { 00100 return procPolyPatch_.neighbProcNo(); 00101 } 00102 00103 //- Return true if running parallel 00104 virtual bool coupled() const 00105 { 00106 if (Pstream::parRun()) 00107 { 00108 return true; 00109 } 00110 else 00111 { 00112 return false; 00113 } 00114 } 00115 00116 //- Return face transformation tensor 00117 virtual const tensorField& forwardT() const 00118 { 00119 return procPolyPatch_.forwardT(); 00120 } 00121 00122 //- Return delta (P to N) vectors across coupled patch 00123 tmp<vectorField> delta() const; 00124 00125 00126 // Interface transfer functions 00127 00128 //- Return the values of the given internal data adjacent to 00129 // the interface as a field 00130 virtual tmp<labelField> interfaceInternalField 00131 ( 00132 const unallocLabelList& internalData 00133 ) const; 00134 00135 //- Initialise interface data transfer 00136 virtual void initTransfer 00137 ( 00138 const Pstream::commsTypes commsType, 00139 const unallocLabelList& interfaceData 00140 ) const; 00141 00142 //- Transfer and return neighbour field 00143 virtual tmp<labelField> transfer 00144 ( 00145 const Pstream::commsTypes commsType, 00146 const unallocLabelList& interfaceData 00147 ) const; 00148 00149 //- Initialise neighbour field transfer 00150 virtual void initInternalFieldTransfer 00151 ( 00152 const Pstream::commsTypes commsType, 00153 const unallocLabelList& internalData 00154 ) const; 00155 00156 //- Return neighbour field 00157 virtual tmp<labelField> internalFieldTransfer 00158 ( 00159 const Pstream::commsTypes commsType, 00160 const unallocLabelList& internalData 00161 ) const; 00162 }; 00163 00164 00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00166 00167 } // End namespace Foam 00168 00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00170 00171 #endif 00172 00173 // ************************************************************************* // |