initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / fvMotionSolver / pointPatchFields / derived / angularOscillatingVelocity / angularOscillatingVelocityPointPatchVectorField.H
blob7e09a7afe1ebfdd5cc6595e0f4cd30d9626e902c
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::angularOscillatingVelocityPointPatchVectorField
28 Description
29     Foam::angularOscillatingVelocityPointPatchVectorField
31 SourceFiles
32     angularOscillatingVelocityPointPatchVectorField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef angularOscillatingVelocityPointPatchVectorField_H
37 #define angularOscillatingVelocityPointPatchVectorField_H
39 #include "fixedValuePointPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47         Class angularOscillatingVelocityPointPatchVectorField Declaration
48 \*---------------------------------------------------------------------------*/
50 class angularOscillatingVelocityPointPatchVectorField
52     public fixedValuePointPatchField<vector>
54     // Private data
56         vector axis_;
57         vector origin_;
58         scalar angle0_;
59         scalar amplitude_;
60         scalar omega_;
62         pointField p0_;
65 public:
67     //- Runtime type information
68     TypeName("angularOscillatingVelocity");
71     // Constructors
73         //- Construct from patch and internal field
74         angularOscillatingVelocityPointPatchVectorField
75         (
76             const pointPatch&,
77             const DimensionedField<vector, pointMesh>&
78         );
80         //- Construct from patch, internal field and dictionary
81         angularOscillatingVelocityPointPatchVectorField
82         (
83             const pointPatch&,
84             const DimensionedField<vector, pointMesh>&,
85             const dictionary&
86         );
88         //- Construct by mapping given patchField<vector> onto a new patch
89         angularOscillatingVelocityPointPatchVectorField
90         (
91             const angularOscillatingVelocityPointPatchVectorField&,
92             const pointPatch&,
93             const DimensionedField<vector, pointMesh>&,
94             const pointPatchFieldMapper&
95         );
97         //- Construct and return a clone
98         virtual autoPtr<pointPatchField<vector> > clone() const
99         {
100             return autoPtr<pointPatchField<vector> >
101             (
102                 new angularOscillatingVelocityPointPatchVectorField
103                 (
104                     *this
105                 )
106             );
107         }
109         //- Construct as copy setting internal field reference
110         angularOscillatingVelocityPointPatchVectorField
111         (
112             const angularOscillatingVelocityPointPatchVectorField&,
113             const DimensionedField<vector, pointMesh>&
114         );
116         //- Construct and return a clone setting internal field reference
117         virtual autoPtr<pointPatchField<vector> > clone
118         (
119             const DimensionedField<vector, pointMesh>& iF
120         ) const
121         {
122             return autoPtr<pointPatchField<vector> >
123             (
124                 new angularOscillatingVelocityPointPatchVectorField
125                 (
126                     *this,
127                     iF
128                 )
129             );
130         }
133     // Member functions
135         // Evaluation functions
137             //- Update the coefficients associated with the patch field
138             virtual void updateCoeffs();
141         //- Write
142         virtual void write(Ostream&) const;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #endif
154 // ************************************************************************* //