Bugfix: added mapping methods to point patch vector fields that have pointField ...
[foam-extend-4.0.git] / src / dynamicMesh / meshMotion / fvMotionSolver / pointPatchFields / derived / angularOscillatingVelocity / angularOscillatingVelocityPointPatchVectorField.H
blobeae094f9c71404f341e1e9b3be70d5654fb24698
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     4.0
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     angularOscillatingVelocityPointPatchVectorField
27 Description
29 SourceFiles
30     angularOscillatingVelocityPointPatchVectorField.C
32 \*---------------------------------------------------------------------------*/
34 #ifndef angularOscillatingVelocityPointPatchVectorField_H
35 #define angularOscillatingVelocityPointPatchVectorField_H
37 #include "fixedValuePointPatchFields.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 namespace Foam
44 /*---------------------------------------------------------------------------*\
45         Class angularOscillatingVelocityPointPatchVectorField Declaration
46 \*---------------------------------------------------------------------------*/
48 class angularOscillatingVelocityPointPatchVectorField
50     public FixedValuePointPatchField
51     <
52         pointPatchField,
53         pointMesh,
54         pointPatch,
55         DummyMatrix,
56         vector
57     >
59     // Private data
61         vector axis_;
62         vector origin_;
63         scalar angle0_;
64         scalar amplitude_;
65         scalar omega_;
67         pointField p0_;
70 public:
72     //- Runtime type information
73     TypeName("angularOscillatingVelocity");
76     // Constructors
78         //- Construct from patch and internal field
79         angularOscillatingVelocityPointPatchVectorField
80         (
81             const pointPatch&,
82             const DimensionedField<vector, pointMesh>&
83         );
85         //- Construct from patch, internal field and dictionary
86         angularOscillatingVelocityPointPatchVectorField
87         (
88             const pointPatch&,
89             const DimensionedField<vector, pointMesh>&,
90             const dictionary&
91         );
93         //- Construct by mapping given patchField<vector> onto a new patch
94         angularOscillatingVelocityPointPatchVectorField
95         (
96             const angularOscillatingVelocityPointPatchVectorField&,
97             const pointPatch&,
98             const DimensionedField<vector, pointMesh>&,
99             const PointPatchFieldMapper&
100         );
102         //- Construct and return a clone
103         virtual autoPtr<pointPatchField<vector> > clone() const
104         {
105             return autoPtr<pointPatchField<vector> >
106             (
107                 new angularOscillatingVelocityPointPatchVectorField(*this)
108             );
109         }
111         //- Construct as copy setting internal field reference
112         angularOscillatingVelocityPointPatchVectorField
113         (
114             const angularOscillatingVelocityPointPatchVectorField&,
115             const DimensionedField<vector, pointMesh>&
116         );
118         //- Construct and return a clone setting internal field reference
119         virtual autoPtr<pointPatchField<vector> > clone
120         (
121             const DimensionedField<vector, pointMesh>& iF
122         ) const
123         {
124             return autoPtr<pointPatchField<vector> >
125             (
126                 new angularOscillatingVelocityPointPatchVectorField(*this, iF)
127             );
128         }
131     // Member functions
133         // Mapping functions
135             //- Map (and resize as needed) from self given a mapping object
136             void autoMap
137             (
138                 const PointPatchFieldMapper&
139             );
141             //- Reverse map the given pointPatchField onto this pointPatchField
142             void rmap
143             (
144                 const PointPatchField
145                     <pointPatchField, pointMesh, pointPatch, DummyMatrix, vector>&,
146                 const labelList&
147             );
149         // Evaluation functions
151             //- Update the coefficients associated with the patch field
152             virtual void updateCoeffs();
155         //- Write
156         virtual void write(Ostream&) const;
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 } // End namespace Foam
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 #endif
168 // ************************************************************************* //