![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 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 coupledFvPatch 00027 00028 Description 00029 coupledFvPatch is an abstract base class for patches that couple regions 00030 of the computational domain e.g. cyclic and processor-processor links. 00031 00032 SourceFiles 00033 coupledFvPatch.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef coupledFvPatch_H 00038 #define coupledFvPatch_H 00039 00040 #include "fvPatch.H" 00041 #include "coupledPolyPatch.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class coupledFvPatch Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class coupledFvPatch 00053 : 00054 public fvPatch 00055 { 00056 // Private data 00057 00058 const coupledPolyPatch& coupledPolyPatch_; 00059 00060 00061 protected: 00062 00063 // Protected Member Functions 00064 00065 //- Make patch weighting factors 00066 virtual void makeWeights(scalarField&) const = 0; 00067 00068 //- Make patch face - neighbour cell distances 00069 virtual void makeDeltaCoeffs(scalarField&) const = 0; 00070 00071 00072 public: 00073 00074 friend class surfaceInterpolation; 00075 00076 00077 //- Runtime type information 00078 TypeName(coupledPolyPatch::typeName_()); 00079 00080 00081 // Constructors 00082 00083 //- Construct from polyPatch 00084 coupledFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm) 00085 : 00086 fvPatch(patch, bm), 00087 coupledPolyPatch_(refCast<const coupledPolyPatch>(patch)) 00088 {} 00089 00090 00091 // Destructor 00092 00093 virtual ~coupledFvPatch(); 00094 00095 00096 // Member Functions 00097 00098 // Access 00099 00100 //- Return true because this patch is coupled 00101 virtual bool coupled() const 00102 { 00103 return coupledPolyPatch_.coupled(); 00104 } 00105 00106 //- Return face transformation tensor 00107 const tensorField& forwardT() const 00108 { 00109 return coupledPolyPatch_.forwardT(); 00110 } 00111 00112 //- Return neighbour-cell transformation tensor 00113 const tensorField& reverseT() const 00114 { 00115 return coupledPolyPatch_.reverseT(); 00116 } 00117 00118 //- Are the cyclic planes parallel 00119 bool parallel() const 00120 { 00121 return coupledPolyPatch_.parallel(); 00122 } 00123 00124 //- Return delta (P to N) vectors across coupled patch 00125 virtual tmp<vectorField> delta() const = 0; 00126 }; 00127 00128 00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00130 00131 } // End namespace Foam 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 #endif 00136 00137 // ************************************************************************* //