Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / finiteVolume / fields / fvPatchFields / derived / outletInlet / outletInletFvPatchField.H
blob5721a876156c754ffa2349d5cdd3f398913fe8c2
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
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::outletInletFvPatchField
27 Description
28     Foam::outletInletFvPatchField
30 SourceFiles
31     outletInletFvPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef outletInletFvPatchField_H
36 #define outletInletFvPatchField_H
38 #include "mixedFvPatchField.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 /*---------------------------------------------------------------------------*\
46                      Class outletInletFvPatch Declaration
47 \*---------------------------------------------------------------------------*/
49 template<class Type>
50 class outletInletFvPatchField
52     public mixedFvPatchField<Type>
55 protected:
57     // Protected data
59         //- Name of flux field
60         word phiName_;
63 public:
65     //- Runtime type information
66     TypeName("outletInlet");
69     // Constructors
71         //- Construct from patch and internal field
72         outletInletFvPatchField
73         (
74             const fvPatch&,
75             const DimensionedField<Type, volMesh>&
76         );
78         //- Construct from patch, internal field and dictionary
79         outletInletFvPatchField
80         (
81             const fvPatch&,
82             const DimensionedField<Type, volMesh>&,
83             const dictionary&
84         );
86         //- Construct by mapping given outletInletFvPatchField onto a new patch
87         outletInletFvPatchField
88         (
89             const outletInletFvPatchField<Type>&,
90             const fvPatch&,
91             const DimensionedField<Type, volMesh>&,
92             const fvPatchFieldMapper&
93         );
95         //- Construct as copy
96         outletInletFvPatchField
97         (
98             const outletInletFvPatchField<Type>&
99         );
101         //- Construct and return a clone
102         virtual tmp<fvPatchField<Type> > clone() const
103         {
104             return tmp<fvPatchField<Type> >
105             (
106                 new outletInletFvPatchField<Type>(*this)
107             );
108         }
110         //- Construct as copy setting internal field reference
111         outletInletFvPatchField
112         (
113             const outletInletFvPatchField<Type>&,
114             const DimensionedField<Type, volMesh>&
115         );
117         //- Construct and return a clone setting internal field reference
118         virtual tmp<fvPatchField<Type> > clone
119         (
120             const DimensionedField<Type, volMesh>& iF
121         ) const
122         {
123             return tmp<fvPatchField<Type> >
124             (
125                 new outletInletFvPatchField<Type>(*this, iF)
126             );
127         }
130     // Member functions
132         //- Update the coefficients associated with the patch field
133         virtual void updateCoeffs();
135         //- Write
136         virtual void write(Ostream&) const;
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #ifdef NoRepository
147 #   include "outletInletFvPatchField.C"
148 #endif
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #endif
154 // ************************************************************************* //