1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
28 Partial overlap generalised grid interface (GGI) patch. Master side
29 remains unchanged and the slave side will be copied as needed
30 to pave the master patch surface.
32 This implies that the master patch has got a larger angular pitch than
33 the slave and that master and slave are aligned at one edge.
34 Master and slave will specify the pitch, based on which the expansion
35 of the master side will be performed and used in interpolation.
38 Hrvoje Jasak, Wikki Ltd. All rights reserved.
43 \*---------------------------------------------------------------------------*/
45 #ifndef overlapGgiFvPatch_H
46 #define overlapGgiFvPatch_H
48 #include "ggiFvPatch.H"
49 #include "overlapGgiLduInterface.H"
50 #include "overlapGgiPolyPatch.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 /*---------------------------------------------------------------------------*\
58 Class overlapGgiFvPatch Declaration
59 \*---------------------------------------------------------------------------*/
61 class overlapGgiFvPatch
63 public coupledFvPatch,
64 public overlapGgiLduInterface
68 //- Reference to polyPatch
69 const overlapGgiPolyPatch& overlapGgiPolyPatch_;
74 // Protected Member functions
76 //- Make patch weighting factors
77 virtual void makeWeights(scalarField&) const;
79 //- Make patch face - neighbour cell distances
80 virtual void makeDeltaCoeffs(scalarField&) const;
82 //- Make patch face non-orthogonality correction vectors
83 virtual void makeCorrVecs(vectorField&) const;
88 //- Runtime type information
89 TypeName(overlapGgiPolyPatch::typeName_());
94 //- Construct from components
95 overlapGgiFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
97 coupledFvPatch(patch, bm),
98 overlapGgiPolyPatch_(refCast<const overlapGgiPolyPatch>(patch))
104 virtual ~overlapGgiFvPatch()
112 //- Is this the master side?
115 return overlapGgiPolyPatch_.master();
118 //- Return shadow patch
119 const overlapGgiFvPatch& shadow() const;
121 //- Interpolate face field
123 tmp<Field<Type> > interpolate(const Field<Type>& pf) const
125 return overlapGgiPolyPatch_.interpolate(pf);
129 tmp<Field<Type> > interpolate(const tmp<Field<Type> >& tpf) const
131 return overlapGgiPolyPatch_.interpolate(tpf);
134 //- Return delta (P to N) vectors across coupled patch
135 virtual tmp<vectorField> delta() const;
138 // Interface transfer functions
140 //- Return the values of the given internal data adjacent to
141 // the interface as a field
142 virtual tmp<labelField> interfaceInternalField
144 const unallocLabelList& internalData
147 //- Transfer and return neighbour field
148 virtual tmp<labelField> transfer
150 const Pstream::commsTypes commsType,
151 const unallocLabelList& interfaceData
154 //- Return neighbour field
155 virtual tmp<labelField> internalFieldTransfer
157 const Pstream::commsTypes commsType,
158 const unallocLabelList& internalData
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 } // End namespace Foam
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 // ************************************************************************* //