initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / fvMotionSolver / fvPatchFields / derived / cellMotion / cellMotionFvPatchField.H
blob7fdd315485dc6c3f843ab6de247f6740f240f597
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::cellMotionFvPatchField
28 Description
29     Foam::cellMotionFvPatchField
31 SourceFiles
32     cellMotionFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef cellMotionFvPatchField_H
37 #define cellMotionFvPatchField_H
39 #include "Random.H"
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                      Class cellMotionFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class Type>
52 class cellMotionFvPatchField
54     public fixedValueFvPatchField<Type>
57 public:
59     //- Runtime type information
60     TypeName("cellMotion");
63     // Constructors
65         //- Construct from patch and internal field
66         cellMotionFvPatchField
67         (
68             const fvPatch&,
69             const DimensionedField<Type, volMesh>&
70         );
72         //- Construct from patch, internal field and dictionary
73         cellMotionFvPatchField
74         (
75             const fvPatch&,
76             const DimensionedField<Type, volMesh>&,
77             const dictionary&
78         );
80         //- Construct by mapping given cellMotionFvPatchField
81         //  onto a new patch
82         cellMotionFvPatchField
83         (
84             const cellMotionFvPatchField<Type>&,
85             const fvPatch&,
86             const DimensionedField<Type, volMesh>&,
87             const fvPatchFieldMapper&
88         );
90         //- Construct as copy
91         cellMotionFvPatchField
92         (
93             const cellMotionFvPatchField<Type>&
94         );
96         //- Construct and return a clone
97         virtual tmp<fvPatchField<Type> > clone() const
98         {
99             return tmp<fvPatchField<Type> >
100             (
101                 new cellMotionFvPatchField<Type>(*this)
102             );
103         }
105         //- Construct as copy setting internal field reference
106         cellMotionFvPatchField
107         (
108             const cellMotionFvPatchField<Type>&,
109             const DimensionedField<Type, volMesh>&
110         );
112         //- Construct and return a clone setting internal field reference
113         virtual tmp<fvPatchField<Type> > clone
114         (
115             const DimensionedField<Type, volMesh>& iF
116         ) const
117         {
118             return tmp<fvPatchField<Type> >
119             (
120                 new cellMotionFvPatchField<Type>(*this, iF)
121             );
122         }
125     // Member functions
127         //- Update the coefficients associated with the patch field
128         virtual void updateCoeffs();
130         //- Write
131         virtual void write(Ostream&) const;
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 } // End namespace Foam
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 #ifdef NoRepository
142 #   include "cellMotionFvPatchField.C"
143 #endif
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #endif
149 // ************************************************************************* //