1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34 \*---------------------------------------------------------------------------*/
36 #ifndef cyclicFvPatch_H
37 #define cyclicFvPatch_H
39 #include "coupledFvPatch.H"
40 #include "cyclicLduInterface.H"
41 #include "cyclicPolyPatch.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class cyclicFvPatch Declaration
50 \*---------------------------------------------------------------------------*/
54 public coupledFvPatch,
55 public cyclicLduInterface
59 const cyclicPolyPatch& cyclicPolyPatch_;
64 // Protected Member functions
66 //- Make patch weighting factors
67 void makeWeights(scalarField&) const;
69 //- Make patch face - neighbour cell distances
70 void makeDeltaCoeffs(scalarField&) const;
75 //- Runtime type information
76 TypeName(cyclicPolyPatch::typeName_());
81 //- Construct from polyPatch
82 cyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
84 coupledFvPatch(patch, bm),
85 cyclicPolyPatch_(refCast<const cyclicPolyPatch>(patch))
93 //- Return face transformation tensor
94 const tensorField& forwardT() const
96 return coupledFvPatch::forwardT();
99 //- Return neighbour-cell transformation tensor
100 const tensorField& reverseT() const
102 return coupledFvPatch::reverseT();
106 //- Return delta (P to N) vectors across coupled patch
107 tmp<vectorField> delta() const;
110 // Interface transfer functions
112 //- Return the values of the given internal data adjacent to
113 // the interface as a field
114 virtual tmp<labelField> interfaceInternalField
116 const unallocLabelList& internalData
119 //- Transfer and return neighbour field
120 virtual tmp<labelField> transfer
122 const Pstream::commsTypes commsType,
123 const unallocLabelList& interfaceData
126 //- Return neighbour field
127 virtual tmp<labelField> internalFieldTransfer
129 const Pstream::commsTypes commsType,
130 const unallocLabelList& internalData
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 } // End namespace Foam
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 // ************************************************************************* //