initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fvMesh / fvPatches / constraint / cyclic / cyclicFvPatch.H
blob8b32c932b108614c96048dd2134a9fb8a65058c8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::cyclicFvPatch
28 Description
29     Cyclic-plane patch.
31 SourceFiles
32     cyclicFvPatch.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef cyclicFvPatch_H
37 #define cyclicFvPatch_H
39 #include "coupledFvPatch.H"
40 #include "cyclicLduInterface.H"
41 #include "cyclicPolyPatch.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                            Class cyclicFvPatch Declaration
50 \*---------------------------------------------------------------------------*/
52 class cyclicFvPatch
54     public coupledFvPatch,
55     public cyclicLduInterface
57     // Private data
59         const cyclicPolyPatch& cyclicPolyPatch_;
62 protected:
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;
73 public:
75     //- Runtime type information
76     TypeName(cyclicPolyPatch::typeName_());
79     // Constructors
81         //- Construct from polyPatch
82         cyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
83         :
84             coupledFvPatch(patch, bm),
85             cyclicPolyPatch_(refCast<const cyclicPolyPatch>(patch))
86         {}
89     // Member functions
91         // Access
93             //- Return face transformation tensor
94             const tensorField& forwardT() const
95             {
96                 return coupledFvPatch::forwardT();
97             }
99             //- Return neighbour-cell transformation tensor
100             const tensorField& reverseT() const
101             {
102                 return coupledFvPatch::reverseT();
103             }
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
115             (
116                 const unallocLabelList& internalData
117             ) const;
119             //- Transfer and return neighbour field
120             virtual tmp<labelField> transfer
121             (
122                 const Pstream::commsTypes commsType,
123                 const unallocLabelList& interfaceData
124             ) const;
126             //- Return neighbour field
127             virtual tmp<labelField> internalFieldTransfer
128             (
129                 const Pstream::commsTypes commsType,
130                 const unallocLabelList& internalData
131             ) const;
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 } // End namespace Foam
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 #endif
143 // ************************************************************************* //