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 regionCoupleFvsPatchField
29 Region couple patch field
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
35 regionCoupleFvsPatchField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef regionCoupleFvsPatchField_H
40 #define regionCoupleFvsPatchField_H
42 #include "coupledFvsPatchField.H"
43 #include "regionCoupleLduInterfaceField.H"
44 #include "regionCoupleFvPatch.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class regionCoupleFvsPatchField Declaration
53 \*---------------------------------------------------------------------------*/
56 class regionCoupleFvsPatchField
58 public coupledFvsPatchField<Type>
62 //- Local reference cast into the regionCouple patch
63 const regionCoupleFvPatch& regionCouplePatch_;
65 //- Name of remote field to couple to
66 word remoteFieldName_;
68 //- Matrix update buffer
69 mutable scalarField matrixUpdateBuffer_;
74 //- Return contents of a matrix update buffer
75 const scalarField& matrixUpdateBuffer() const
77 return matrixUpdateBuffer_;
83 //- Runtime type information
84 // TypeName(regionCoupleFvPatch::typeName_());
85 TypeName("regionCoupling");
90 //- Construct from patch and internal field
91 regionCoupleFvsPatchField
94 const DimensionedField<Type, surfaceMesh>&
97 //- Construct from patch, internal field and dictionary
98 regionCoupleFvsPatchField
101 const DimensionedField<Type, surfaceMesh>&,
105 //- Construct by mapping given regionCoupleFvsPatchField
107 regionCoupleFvsPatchField
109 const regionCoupleFvsPatchField<Type>&,
111 const DimensionedField<Type, surfaceMesh>&,
112 const fvPatchFieldMapper&
115 //- Construct as copy setting internal field reference
116 regionCoupleFvsPatchField
118 const regionCoupleFvsPatchField<Type>&,
119 const DimensionedField<Type, surfaceMesh>&
122 //- Construct and return a clone
123 virtual tmp<fvsPatchField<Type> > clone() const
125 return tmp<fvsPatchField<Type> >
127 new regionCoupleFvsPatchField<Type>(*this)
131 //- Construct and return a clone setting internal field reference
132 virtual tmp<fvsPatchField<Type> > clone
134 const DimensionedField<Type, surfaceMesh>& iF
137 return tmp<fvsPatchField<Type> >
139 new regionCoupleFvsPatchField<Type>(*this, iF)
146 // Evaluation functions
148 //- Return remote field name
149 const word& remoteFieldName() const
151 return remoteFieldName_;
154 //- Return shadow patch field
155 const regionCoupleFvsPatchField<Type>& shadowPatchField() const;
159 virtual void write(Ostream&) const;
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 # include "regionCoupleFvsPatchField.C"
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 // ************************************************************************* //