BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / finiteVolume / fields / fvPatchFields / derived / outletMappedUniformInlet / outletMappedUniformInletFvPatchField.H
blobc04b7e2f1794f34b173eb45dde30241e9eed26fb
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::outletMappedUniformInletFvPatchField
27 Description
28     Averages the field over the "outlet" patch specified by name
29     "outletPatchName" and applies this as the uniform value of the field
30     over this patch.
32 SourceFiles
33     outletMappedUniformInletFvPatchField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef outletMappedUniformInletFvPatchField_H
38 #define outletMappedUniformInletFvPatchField_H
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48               Class outletMappedUniformInletFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class Type>
52 class outletMappedUniformInletFvPatchField
54     public fixedValueFvPatchField<Type>
56     // Private data
58         //- Name of the outlet patch to be mapped
59         word outletPatchName_;
61        //- Name of the flux transporting the field
62         word phiName_;
65 public:
67     //- Runtime type information
68     TypeName("outletMappedUniformInlet");
71     // Constructors
73         //- Construct from patch and internal field
74         outletMappedUniformInletFvPatchField
75         (
76             const fvPatch&,
77             const DimensionedField<Type, volMesh>&
78         );
80         //- Construct from patch, internal field and dictionary
81         outletMappedUniformInletFvPatchField
82         (
83             const fvPatch&,
84             const DimensionedField<Type, volMesh>&,
85             const dictionary&
86         );
88         //- Construct by mapping given outletMappedUniformInletFvPatchField
89         //  onto a new patch
90         outletMappedUniformInletFvPatchField
91         (
92             const outletMappedUniformInletFvPatchField<Type>&,
93             const fvPatch&,
94             const DimensionedField<Type, volMesh>&,
95             const fvPatchFieldMapper&
96         );
98         //- Construct as copy
99         outletMappedUniformInletFvPatchField
100         (
101             const outletMappedUniformInletFvPatchField<Type>&
102         );
104         //- Construct and return a clone
105         virtual tmp<fvPatchField<Type> > clone() const
106         {
107             return tmp<fvPatchField<Type> >
108             (
109                 new outletMappedUniformInletFvPatchField<Type>(*this)
110             );
111         }
113         //- Construct as copy setting internal field reference
114         outletMappedUniformInletFvPatchField
115         (
116             const outletMappedUniformInletFvPatchField<Type>&,
117             const DimensionedField<Type, volMesh>&
118         );
120         //- Construct and return a clone setting internal field reference
121         virtual tmp<fvPatchField<Type> > clone
122         (
123             const DimensionedField<Type, volMesh>& iF
124         ) const
125         {
126             return tmp<fvPatchField<Type> >
127             (
128                 new outletMappedUniformInletFvPatchField<Type>(*this, iF)
129             );
130         }
133     // Member functions
135         // Access
137             //- Name of the outlet patch to be mapped
138             const word& outletPatchName() const
139             {
140                 return outletPatchName_;
141             }
144         // Evaluation functions
146             //- Update the coefficients associated with the patch field
147             virtual void updateCoeffs();
150         //- Write
151         virtual void write(Ostream&) const;
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 } // End namespace Foam
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 #ifdef NoRepository
162 #   include "outletMappedUniformInletFvPatchField.C"
163 #endif
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 #endif
169 // ************************************************************************* //