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/>.
25 Foam::genericFvPatchField
28 Foam::genericFvPatchField
33 \*---------------------------------------------------------------------------*/
35 #ifndef genericFvPatchField_H
36 #define genericFvPatchField_H
38 #include "calculatedFvPatchField.H"
39 #include "HashPtrTable.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class genericFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
51 class genericFvPatchField
53 public calculatedFvPatchField<Type>
60 HashPtrTable<scalarField> scalarFields_;
61 HashPtrTable<vectorField> vectorFields_;
62 HashPtrTable<sphericalTensorField> sphericalTensorFields_;
63 HashPtrTable<symmTensorField> symmTensorFields_;
64 HashPtrTable<symmTensor4thOrderField> symmTensor4thOrderFields_;
65 HashPtrTable<diagTensorField> diagTensorFields_;
66 HashPtrTable<tensorField> tensorFields_;
71 //- Runtime type information
77 //- Construct from patch and internal field
81 const DimensionedField<Type, volMesh>&
84 //- Construct from patch, internal field and dictionary
88 const DimensionedField<Type, volMesh>&,
92 //- Construct by mapping given patchField<Type> onto a new patch
95 const genericFvPatchField<Type>&,
97 const DimensionedField<Type, volMesh>&,
98 const fvPatchFieldMapper&
101 //- Construct as copy
104 const genericFvPatchField<Type>&
107 //- Construct and return a clone
108 virtual tmp<fvPatchField<Type> > clone() const
110 return tmp<fvPatchField<Type> >
112 new genericFvPatchField<Type>(*this)
116 //- Construct as copy setting internal field reference
119 const genericFvPatchField<Type>&,
120 const DimensionedField<Type, volMesh>&
123 //- Construct and return a clone setting internal field reference
124 virtual tmp<fvPatchField<Type> > clone
126 const DimensionedField<Type, volMesh>& iF
129 return tmp<fvPatchField<Type> >
131 new genericFvPatchField<Type>(*this, iF)
140 //- Map (and resize as needed) from self given a mapping object
143 const fvPatchFieldMapper&
146 //- Reverse map the given fvPatchField onto this fvPatchField
149 const fvPatchField<Type>&,
154 // Evaluation functions
156 //- Return the matrix diagonal coefficients corresponding to the
157 // evaluation of the value of this patchField with given weights
158 virtual tmp<Field<Type> > valueInternalCoeffs
160 const tmp<scalarField>&
163 //- Return the matrix source coefficients corresponding to the
164 // evaluation of the value of this patchField with given weights
165 virtual tmp<Field<Type> > valueBoundaryCoeffs
167 const tmp<scalarField>&
170 //- Return the matrix diagonal coefficients corresponding to the
171 // evaluation of the gradient of this patchField
172 tmp<Field<Type> > gradientInternalCoeffs() const;
174 //- Return the matrix source coefficients corresponding to the
175 // evaluation of the gradient of this patchField
176 tmp<Field<Type> > gradientBoundaryCoeffs() const;
180 virtual void write(Ostream&) const;
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 # include "genericFvPatchField.C"
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 // ************************************************************************* //