BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / turbulenceModels / compressible / turbulenceModel / derivedFvPatchFields / totalFlowRateAdvectiveDiffusive / totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H
blob562362efedc8114d6f529cb1b9d83f56a0bad490
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::totalFlowRateAdvectiveDiffusiveFvPatchScalarField
27 Description
28     Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField
30 SourceFiles
31     totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef totalFlowRateAdvectiveDiffusiveFvPatchScalarField_H
36 #define totalFlowRateAdvectiveDiffusiveFvPatchScalarField_H
38 #include "mixedFvPatchField.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 /*---------------------------------------------------------------------------*\
46      Class totalFlowRateAdvectiveDiffusiveFvPatchScalarField Declaration
47 \*---------------------------------------------------------------------------*/
49 class totalFlowRateAdvectiveDiffusiveFvPatchScalarField
51     public mixedFvPatchField<scalar>
53     // Private data
55         //- Name of the flux transporting the field
56         word phiName_;
58         //- Name of the density field used to normalise the mass flux
59         //  if neccessary
60         word rhoName_;
63 public:
65     //- Runtime type information
66     TypeName("totalFlowRateAdvectiveDiffusive");
69     // Constructors
71         //- Construct from patch and internal field
72         totalFlowRateAdvectiveDiffusiveFvPatchScalarField
73         (
74             const fvPatch&,
75             const DimensionedField<scalar, volMesh>&
76         );
78         //- Construct from patch, internal field and dictionary
79         totalFlowRateAdvectiveDiffusiveFvPatchScalarField
80         (
81             const fvPatch&,
82             const DimensionedField<scalar, volMesh>&,
83             const dictionary&
84         );
86         //- Construct by mapping given
87         //  totalFlowRateAdvectiveDiffusiveFvPatchScalarField
88         //  onto a new patch
89         totalFlowRateAdvectiveDiffusiveFvPatchScalarField
90         (
91             const totalFlowRateAdvectiveDiffusiveFvPatchScalarField&,
92             const fvPatch&,
93             const DimensionedField<scalar, volMesh>&,
94             const fvPatchFieldMapper&
95         );
97         //- Construct as copy
98         totalFlowRateAdvectiveDiffusiveFvPatchScalarField
99         (
100             const totalFlowRateAdvectiveDiffusiveFvPatchScalarField&
101         );
103         //- Construct and return a clone
104         virtual tmp<fvPatchField<scalar> > clone() const
105         {
106             return tmp<fvPatchField<scalar> >
107             (
108                 new
109                 totalFlowRateAdvectiveDiffusiveFvPatchScalarField(*this)
110             );
111         }
113         //- Construct as copy setting internal field reference
114         totalFlowRateAdvectiveDiffusiveFvPatchScalarField
115         (
116             const totalFlowRateAdvectiveDiffusiveFvPatchScalarField&,
117             const DimensionedField<scalar, volMesh>&
118         );
120         //- Construct and return a clone setting internal field reference
121         virtual tmp<fvPatchField<scalar> > clone
122         (
123             const DimensionedField<scalar, volMesh>& iF
124         ) const
125         {
126             return tmp<fvPatchField<scalar> >
127             (
128                 new
129                 totalFlowRateAdvectiveDiffusiveFvPatchScalarField
130                 (
131                     *this,
132                     iF
133                 )
134             );
135         }
138     // Member functions
140         // Access
142             //- Return reference to the name of the flux field
143             word& phiName()
144             {
145                 return phiName_;
146             }
149         // Mapping functions
151             //- Map (and resize as needed) from self given a mapping object
152             virtual void autoMap
153             (
154                 const fvPatchFieldMapper&
155             );
157             //- Reverse map the given fvPatchField onto this fvPatchField
158             virtual void rmap
159             (
160                 const fvPatchScalarField&,
161                 const labelList&
162             );
165         // Evaluation functions
167             //- Update the coefficients associated with the patch field
168             virtual void updateCoeffs();
171         //- Write
172         virtual void write(Ostream&) const;
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 } // End namespace Foam
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 #endif
184 // ************************************************************************* //