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 Foam::genericFvPatchField
29 Foam::genericFvPatchField
34 \*---------------------------------------------------------------------------*/
36 #ifndef genericFvPatchField_H
37 #define genericFvPatchField_H
39 #include "calculatedFvPatchField.H"
40 #include "HashPtrTable.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class genericFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
52 class genericFvPatchField
54 public calculatedFvPatchField<Type>
61 HashPtrTable<scalarField> scalarFields_;
62 HashPtrTable<vectorField> vectorFields_;
63 HashPtrTable<sphericalTensorField> sphericalTensorFields_;
64 HashPtrTable<symmTensorField> symmTensorFields_;
65 HashPtrTable<tensorField> tensorFields_;
70 //- Runtime type information
76 //- Construct from patch and internal field
80 const DimensionedField<Type, volMesh>&
83 //- Construct from patch, internal field and dictionary
87 const DimensionedField<Type, volMesh>&,
91 //- Construct by mapping given patchField<Type> onto a new patch
94 const genericFvPatchField<Type>&,
96 const DimensionedField<Type, volMesh>&,
97 const fvPatchFieldMapper&
100 //- Construct as copy
103 const genericFvPatchField<Type>&
106 //- Construct and return a clone
107 virtual tmp<fvPatchField<Type> > clone() const
109 return tmp<fvPatchField<Type> >
111 new genericFvPatchField<Type>(*this)
115 //- Construct as copy setting internal field reference
118 const genericFvPatchField<Type>&,
119 const DimensionedField<Type, volMesh>&
122 //- Construct and return a clone setting internal field reference
123 virtual tmp<fvPatchField<Type> > clone
125 const DimensionedField<Type, volMesh>& iF
128 return tmp<fvPatchField<Type> >
130 new genericFvPatchField<Type>(*this, iF)
139 //- Map (and resize as needed) from self given a mapping object
142 const fvPatchFieldMapper&
145 //- Reverse map the given fvPatchField onto this fvPatchField
148 const fvPatchField<Type>&,
153 // Evaluation functions
155 //- Return the matrix diagonal coefficients corresponding to the
156 // evaluation of the value of this patchField with given weights
157 virtual tmp<Field<Type> > valueInternalCoeffs
159 const tmp<scalarField>&
162 //- Return the matrix source coefficients corresponding to the
163 // evaluation of the value of this patchField with given weights
164 virtual tmp<Field<Type> > valueBoundaryCoeffs
166 const tmp<scalarField>&
169 //- Return the matrix diagonal coefficients corresponding to the
170 // evaluation of the gradient of this patchField
171 tmp<Field<Type> > gradientInternalCoeffs() const;
173 //- Return the matrix source coefficients corresponding to the
174 // evaluation of the gradient of this patchField
175 tmp<Field<Type> > gradientBoundaryCoeffs() const;
179 virtual void write(Ostream&) const;
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 # include "genericFvPatchField.C"
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 // ************************************************************************* //