Fix tutorials: coupled/conjugateHeatFoam/conjugateCavity: fix Allrun file
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvPatchFields / basic / generic / genericFvPatchField.H
blob9dac2cf82480067ec54e2a1c4faeb8f07758f761
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::genericFvPatchField
28 Description
29     Foam::genericFvPatchField
31 SourceFiles
32     genericFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef genericFvPatchField_H
37 #define genericFvPatchField_H
39 #include "calculatedFvPatchField.H"
40 #include "HashPtrTable.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                       Class genericFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class Type>
52 class genericFvPatchField
54     public calculatedFvPatchField<Type>
56     // Private data
58         word actualTypeName_;
59         dictionary dict_;
61         HashPtrTable<scalarField> scalarFields_;
62         HashPtrTable<vectorField> vectorFields_;
63         HashPtrTable<sphericalTensorField> sphericalTensorFields_;
64         HashPtrTable<symmTensorField> symmTensorFields_;
65         HashPtrTable<tensorField> tensorFields_;
68 public:
70     //- Runtime type information
71     TypeName("generic");
74     // Constructors
76         //- Construct from patch and internal field
77         genericFvPatchField
78         (
79             const fvPatch&,
80             const DimensionedField<Type, volMesh>&
81         );
83         //- Construct from patch, internal field and dictionary
84         genericFvPatchField
85         (
86             const fvPatch&,
87             const DimensionedField<Type, volMesh>&,
88             const dictionary&
89         );
91         //- Construct by mapping given patchField<Type> onto a new patch
92         genericFvPatchField
93         (
94             const genericFvPatchField<Type>&,
95             const fvPatch&,
96             const DimensionedField<Type, volMesh>&,
97             const fvPatchFieldMapper&
98         );
100         //- Construct as copy
101         genericFvPatchField
102         (
103             const genericFvPatchField<Type>&
104         );
106         //- Construct and return a clone
107         virtual tmp<fvPatchField<Type> > clone() const
108         {
109             return tmp<fvPatchField<Type> >
110             (
111                 new genericFvPatchField<Type>(*this)
112             );
113         }
115         //- Construct as copy setting internal field reference
116         genericFvPatchField
117         (
118             const genericFvPatchField<Type>&,
119             const DimensionedField<Type, volMesh>&
120         );
122         //- Construct and return a clone setting internal field reference
123         virtual tmp<fvPatchField<Type> > clone
124         (
125             const DimensionedField<Type, volMesh>& iF
126         ) const
127         {
128             return tmp<fvPatchField<Type> >
129             (
130                 new genericFvPatchField<Type>(*this, iF)
131             );
132         }
135     // Member functions
137         // Mapping functions
139             //- Map (and resize as needed) from self given a mapping object
140             virtual void autoMap
141             (
142                 const fvPatchFieldMapper&
143             );
145             //- Reverse map the given fvPatchField onto this fvPatchField
146             virtual void rmap
147             (
148                 const fvPatchField<Type>&,
149                 const labelList&
150             );
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
158             (
159                 const tmp<scalarField>&
160             ) const;
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
165             (
166                 const tmp<scalarField>&
167             ) const;
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;
178         //- Write
179         virtual void write(Ostream&) const;
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 #ifdef NoRepository
190 #   include "genericFvPatchField.C"
191 #endif
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 #endif
197 // ************************************************************************* //