Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / fvMotionSolver / pointPatchFields / derived / oscillatingVelocity / oscillatingVelocityPointPatchVectorField.H
blob179f75f6770b1325bd0f574df42c1a103679df98
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::oscillatingVelocityPointPatchVectorField
28 Description
29     Foam::oscillatingVelocityPointPatchVectorField
31 SourceFiles
32     oscillatingVelocityPointPatchVectorField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef oscillatingVelocityPointPatchVectorField_H
37 #define oscillatingVelocityPointPatchVectorField_H
39 #include "fixedValuePointPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47         Class oscillatingVelocityPointPatchVectorField Declaration
48 \*---------------------------------------------------------------------------*/
50 class oscillatingVelocityPointPatchVectorField
52     public FixedValuePointPatchField
53     <
54         pointPatchField,
55         pointMesh,
56         pointPatch,
57         DummyMatrix,
58         vector
59     >
61     // Private data
63         vector amplitude_;
64         scalar omega_;
66         pointField p0_;
69 public:
71     //- Runtime type information
72     TypeName("oscillatingVelocity");
75     // Constructors
77         //- Construct from patch and internal field
78         oscillatingVelocityPointPatchVectorField
79         (
80             const pointPatch&,
81             const DimensionedField<vector, pointMesh>&
82         );
84         //- Construct from patch, internal field and dictionary
85         oscillatingVelocityPointPatchVectorField
86         (
87             const pointPatch&,
88             const DimensionedField<vector, pointMesh>&,
89             const dictionary&
90         );
92         //- Construct by mapping given patchField<vector> onto a new patch
93         oscillatingVelocityPointPatchVectorField
94         (
95             const oscillatingVelocityPointPatchVectorField&,
96             const pointPatch&,
97             const DimensionedField<vector, pointMesh>&,
98             const PointPatchFieldMapper&
99         );
101         //- Construct and return a clone
102         virtual autoPtr<pointPatchField<vector> > clone() const
103         {
104             return autoPtr<pointPatchField<vector> >
105             (
106                 new oscillatingVelocityPointPatchVectorField(*this)
107             );
108         }
110         //- Construct as copy setting internal field reference
111         oscillatingVelocityPointPatchVectorField
112         (
113             const oscillatingVelocityPointPatchVectorField&,
114             const DimensionedField<vector, pointMesh>&
115         );
117         //- Construct and return a clone setting internal field reference
118         virtual autoPtr<pointPatchField<vector> > clone
119         (
120             const DimensionedField<vector, pointMesh>& iF
121         ) const
122         {
123             return autoPtr<pointPatchField<vector> >
124             (
125                 new oscillatingVelocityPointPatchVectorField(*this, iF)
126             );
127         }
130     // Member functions
132         // Evaluation functions
134             //- Update the coefficients associated with the patch field
135             virtual void updateCoeffs();
138         //- Write
139         virtual void write(Ostream&) const;
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace Foam
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 #endif
151 // ************************************************************************* //