1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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
26 overlapGgiFvPatchField
29 Partial overlap generalized grid interface patch field.
32 Hrvoje Jasak, Wikki Ltd. All rights reserved.
35 overlapGgiFvPatchField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef overlapGgiFvPatchField_H
40 #define overlapGgiFvPatchField_H
42 #include "coupledFvPatchField.H"
43 #include "overlapGgiLduInterfaceField.H"
44 #include "overlapGgiFvPatch.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class overlapGgiFvPatchField Declaration
53 \*---------------------------------------------------------------------------*/
56 class overlapGgiFvPatchField
58 public overlapGgiLduInterfaceField,
59 public coupledFvPatchField<Type>
63 //- Local reference cast into the overlapGgi patch
64 const overlapGgiFvPatch& overlapGgiPatch_;
69 //- Runtime type information
70 TypeName(overlapGgiFvPatch::typeName_());
75 //- Construct from patch and internal field
76 overlapGgiFvPatchField
79 const DimensionedField<Type, volMesh>&
82 //- Construct from patch, internal field and dictionary
83 overlapGgiFvPatchField
86 const DimensionedField<Type, volMesh>&,
90 //- Construct by mapping given overlapGgiFvPatchField onto a new patch
91 overlapGgiFvPatchField
93 const overlapGgiFvPatchField<Type>&,
95 const DimensionedField<Type, volMesh>&,
96 const fvPatchFieldMapper&
99 //- Construct as copy setting internal field reference
100 overlapGgiFvPatchField
102 const overlapGgiFvPatchField<Type>&,
103 const DimensionedField<Type, volMesh>&
106 //- Construct and return a clone
107 virtual tmp<fvPatchField<Type> > clone() const
109 return tmp<fvPatchField<Type> >
111 new overlapGgiFvPatchField<Type>(*this)
115 //- Construct and return a clone setting internal field reference
116 virtual tmp<fvPatchField<Type> > clone
118 const DimensionedField<Type, volMesh>& iF
121 return tmp<fvPatchField<Type> >
123 new overlapGgiFvPatchField<Type>(*this, iF)
130 // Evaluation functions
132 //- Return neighbour field given internal cell data
133 // This is a dummy function: returning patch values
134 // due to scheduling issues in parallel communication.
135 // See processofFvPatchField for details HJ, 11/May/2009
136 virtual tmp<Field<Type> > patchNeighbourField() const;
138 //- Initialise the evaluation of the patch field
139 virtual void initEvaluate(const Pstream::commsTypes commsType);
141 //- Evaluate the patch field
142 virtual void evaluate
144 const Pstream::commsTypes commsType
147 //- Initialise neighbour matrix update
148 virtual void initInterfaceMatrixUpdate
150 const scalarField& psiInternal,
153 const scalarField& coeffs,
154 const direction cmpt,
155 const Pstream::commsTypes commsType
158 //- Update result field based on interface functionality
159 virtual void updateInterfaceMatrix
161 const scalarField& psiInternal,
164 const scalarField& coeffs,
165 const direction cmpt,
166 const Pstream::commsTypes commsType
170 //- GGI coupled interface functions
172 //- Does the patch field perform the transfromation
173 virtual bool doTransform() const
178 //- Return face transformation tensor
179 virtual const tensorField& forwardT() const
181 return overlapGgiPatch_.forwardT();
184 //- Return neighbour-cell transformation tensor
185 virtual const tensorField& reverseT() const
187 return overlapGgiPatch_.reverseT();
190 //- Return rank of component for transform
191 virtual int rank() const
193 return pTraits<Type>::rank;
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 } // End namespace Foam
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 # include "overlapGgiFvPatchField.C"
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 // ************************************************************************* //