Forward compatibility: flex
[foam-extend-3.2.git] / src / finiteVolume / fvMesh / fvPatches / constraint / cyclic / cyclicFvPatch.H
blob36bda69aacf217bb4c421b04e59e80bd682f4849
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::cyclicFvPatch
27 Description
28     Cyclic-plane patch.
30 SourceFiles
31     cyclicFvPatch.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef cyclicFvPatch_H
36 #define cyclicFvPatch_H
38 #include "coupledFvPatch.H"
39 #include "cyclicLduInterface.H"
40 #include "cyclicPolyPatch.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class cyclicFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class cyclicFvPatch
53     public coupledFvPatch,
54     public cyclicLduInterface
56     // Private data
58         const cyclicPolyPatch& cyclicPolyPatch_;
61 protected:
63     // Protected Member functions
65         //- Make patch weighting factors
66         void makeWeights(scalarField&) const;
68         //- Make patch face - neighbour cell distances
69         void makeDeltaCoeffs(scalarField&) const;
72 public:
74     //- Runtime type information
75     TypeName(cyclicPolyPatch::typeName_());
78     // Constructors
80         //- Construct from polyPatch
81         cyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
82         :
83             coupledFvPatch(patch, bm),
84             cyclicPolyPatch_(refCast<const cyclicPolyPatch>(patch))
85         {}
88     // Destructor
90         virtual ~cyclicFvPatch()
91         {}
94     // Member functions
96         // Access
98             //- Return face transformation tensor
99             virtual const tensorField& forwardT() const
100             {
101                 return coupledFvPatch::forwardT();
102             }
104             //- Return neighbour-cell transformation tensor
105             virtual const tensorField& reverseT() const
106             {
107                 return coupledFvPatch::reverseT();
108             }
111             //- Return delta (P to N) vectors across coupled patch
112             virtual tmp<vectorField> delta() const;
115         // Interface transfer functions
117             //- Return the values of the given internal data adjacent to
118             //  the interface as a field
119             virtual tmp<labelField> interfaceInternalField
120             (
121                 const unallocLabelList& internalData
122             ) const;
124             //- Transfer and return neighbour field
125             virtual tmp<labelField> transfer
126             (
127                 const Pstream::commsTypes commsType,
128                 const unallocLabelList& interfaceData
129             ) const;
131             //- Return neighbour field
132             virtual tmp<labelField> internalFieldTransfer
133             (
134                 const Pstream::commsTypes commsType,
135                 const unallocLabelList& internalData
136             ) const;
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #endif
148 // ************************************************************************* //