fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvPatchFields / derived / flux / fluxFvPatchField.H
blob0b2fe6eac3ceab5f8f237a660d7425f426e415fa
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::fluxFvPatchField
28 Description
29     Foam::fluxFvPatchField
31 SourceFiles
32     fluxFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef fluxFvPatchField_H
37 #define fluxFvPatchField_H
39 #include "fixedGradientFvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                         Class fluxFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class Type>
51 class fluxFvPatchField
53     public fixedGradientFvPatchField<Type>
55     // Private data
57         //- Reactivity
58         scalar reactivity_;
60         //- Name of diffusion field
61         word gammaName_;
64 public:
66     //- Runtime type information
67     TypeName("flux");
70     // Constructors
72         //- Construct from patch and internal field
73         fluxFvPatchField
74         (
75             const fvPatch&,
76             const DimensionedField<Type, volMesh>&
77         );
79         //- Construct from patch, internal field and dictionary
80         fluxFvPatchField
81         (
82             const fvPatch&,
83             const DimensionedField<Type, volMesh>&,
84             const dictionary&
85         );
87         //- Construct by mapping given fluxFvPatchField onto a new patch
88         fluxFvPatchField
89         (
90             const fluxFvPatchField<Type>&,
91             const fvPatch&,
92             const DimensionedField<Type, volMesh>&,
93             const fvPatchFieldMapper&
94         );
96         //- Construct as copy
97         fluxFvPatchField
98         (
99             const fluxFvPatchField<Type>&
100         );
102         //- Construct and return a clone
103         virtual tmp<fvPatchField<Type> > clone() const
104         {
105             return tmp<fvPatchField<Type> >
106             (
107                 new fluxFvPatchField<Type>(*this)
108             );
109         }
111         //- Construct as copy setting internal field reference
112         fluxFvPatchField
113         (
114             const fluxFvPatchField<Type>&,
115             const DimensionedField<Type, volMesh>&
116         );
118         //- Construct and return a clone setting internal field reference
119         virtual tmp<fvPatchField<Type> > clone
120         (
121             const DimensionedField<Type, volMesh>& iF
122         ) const
123         {
124             return tmp<fvPatchField<Type> >
125             (
126                 new fluxFvPatchField<Type>(*this, iF)
127             );
128         }
131     // Member functions
133         //- Update the coefficients associated with the patch field
134         virtual void updateCoeffs();
136         //- Write
137         virtual void write(Ostream&) const;
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #ifdef NoRepository
148 #   include "fluxFvPatchField.C"
149 #endif
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 #endif
155 // ************************************************************************* //