FreeFOAM The Cross-Platform CFD Toolkit
cyclicFvPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::cyclicFvPatch
26 
27 Description
28  Cyclic-plane patch.
29 
30 SourceFiles
31  cyclicFvPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicFvPatch_H
36 #define cyclicFvPatch_H
37 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cyclicFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public coupledFvPatch,
54  public cyclicLduInterface
55 {
56  // Private data
57 
58  const cyclicPolyPatch& cyclicPolyPatch_;
59 
60 
61 protected:
62 
63  // Protected Member functions
64 
65  //- Make patch weighting factors
66  void makeWeights(scalarField&) const;
67 
68  //- Make patch face - neighbour cell distances
69  void makeDeltaCoeffs(scalarField&) const;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName(cyclicPolyPatch::typeName_());
76 
77 
78  // Constructors
79 
80  //- Construct from polyPatch
82  :
83  coupledFvPatch(patch, bm),
84  cyclicPolyPatch_(refCast<const cyclicPolyPatch>(patch))
85  {}
86 
87 
88  // Member functions
89 
90  // Access
91 
92  //- Return face transformation tensor
93  const tensorField& forwardT() const
94  {
95  return coupledFvPatch::forwardT();
96  }
97 
98  //- Return neighbour-cell transformation tensor
99  const tensorField& reverseT() const
100  {
101  return coupledFvPatch::reverseT();
102  }
103 
104 
105  //- Return delta (P to N) vectors across coupled patch
106  tmp<vectorField> delta() const;
107 
108 
109  // Interface transfer functions
110 
111  //- Return the values of the given internal data adjacent to
112  // the interface as a field
114  (
115  const unallocLabelList& internalData
116  ) const;
117 
118  //- Transfer and return neighbour field
119  virtual tmp<labelField> transfer
120  (
121  const Pstream::commsTypes commsType,
122  const unallocLabelList& interfaceData
123  ) const;
124 
125  //- Return neighbour field
127  (
128  const Pstream::commsTypes commsType,
129  const unallocLabelList& internalData
130  ) const;
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************ vim: set sw=4 sts=4 et: ************************ //