initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / finiteVolume / fields / fvPatchFields / derived / pressureDirectedInletVelocity / pressureDirectedInletVelocityFvPatchVectorField.H
bloba80e7779b2d6e8ff1aad6a8fb37052d24921b332
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 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 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::pressureDirectedInletVelocityFvPatchVectorField
28 Description
29     Foam::pressureDirectedInletOutletVelocityFvPatchVectorField
31 SourceFiles
32     pressureDirectedInletVelocityFvPatchVectorField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef pressureDirectedInletVelocityFvPatchVectorField_H
37 #define pressureDirectedInletVelocityFvPatchVectorField_H
39 #include "fvPatchFields.H"
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                  Class pressureDirectedInletVelocityFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class pressureDirectedInletVelocityFvPatchVectorField
53     public fixedValueFvPatchVectorField
55     // Private data
56     
57         vectorField inletDir_;
60 public:
62     //- Runtime type information
63     TypeName("pressureDirectedInletVelocity");
66     // Constructors
68         //- Construct from patch and internal field
69         pressureDirectedInletVelocityFvPatchVectorField
70         (
71             const fvPatch&,
72             const DimensionedField<vector, volMesh>&
73         );
75         //- Construct from patch, internal field and dictionary
76         pressureDirectedInletVelocityFvPatchVectorField
77         (
78             const fvPatch&,
79             const DimensionedField<vector, volMesh>&,
80             const dictionary&
81         );
83         //- Construct by mapping given
84         //  pressureDirectedInletVelocityFvPatchVectorField
85         //  onto a new patch
86         pressureDirectedInletVelocityFvPatchVectorField
87         (
88             const pressureDirectedInletVelocityFvPatchVectorField&,
89             const fvPatch&,
90             const DimensionedField<vector, volMesh>&,
91             const fvPatchFieldMapper&
92         );
94         //- Construct as copy
95         pressureDirectedInletVelocityFvPatchVectorField
96         (
97             const pressureDirectedInletVelocityFvPatchVectorField&
98         );
100         //- Construct and return a clone
101         virtual tmp<fvPatchVectorField> clone() const
102         {
103             return tmp<fvPatchVectorField>
104             (
105                 new pressureDirectedInletVelocityFvPatchVectorField(*this)
106             );
107         }
109         //- Construct as copy setting internal field reference
110         pressureDirectedInletVelocityFvPatchVectorField
111         (
112             const pressureDirectedInletVelocityFvPatchVectorField&,
113             const DimensionedField<vector, volMesh>&
114         );
116         //- Construct and return a clone setting internal field reference
117         virtual tmp<fvPatchVectorField> clone
118         (
119             const DimensionedField<vector, volMesh>& iF
120         ) const
121         {
122             return tmp<fvPatchVectorField>
123             (
124                 new pressureDirectedInletVelocityFvPatchVectorField
125                 (
126                     *this,
127                     iF
128                 )
129             );
130         }
134     // Member functions
136         // Mapping functions
138             //- Map (and resize as needed) from self given a mapping object
139             virtual void autoMap
140             (
141                 const fvPatchFieldMapper&
142             );
144             //- Reverse map the given fvPatchField onto this fvPatchField
145             virtual void rmap
146             (
147                 const fvPatchVectorField&,
148                 const labelList&
149             );
152         //- Update the coefficients associated with the patch field
153         virtual void updateCoeffs();
155         //- Write
156         virtual void write(Ostream&) const;
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 } // End namespace Foam
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 #endif
168 // ************************************************************************* //