oscillatingDisplacementPointPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::oscillatingDisplacementPointPatchVectorField
28 
29 Description
30  Foam::oscillatingDisplacementPointPatchVectorField
31 
32 SourceFiles
33  oscillatingDisplacementPointPatchVectorField.cxx
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef Foam_oscillatingDisplacementPointPatchVectorField_H
38 #define Foam_oscillatingDisplacementPointPatchVectorField_H
39 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class oscillatingDisplacementPointPatchVectorField Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public fixedValuePointPatchField<vector>
54 {
57 
58  // Private Data
59 
60  vector amplitude_;
61  scalar omega_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("oscillatingDisplacement");
68 
69 
70  // Constructors
71 
72  //- Construct from patch and internal field
74  (
75  const pointPatch&,
77  );
78 
79  //- Construct from patch, internal field and dictionary
81  (
82  const pointPatch&,
84  const dictionary&
85  );
86 
87  //- Construct by mapping onto a new patch
89  (
90  const this_bctype&,
91  const pointPatch&,
94  );
95 
96  //- Construct as copy setting internal field reference
98  (
99  const this_bctype&,
101  );
102 
103  //- No copy without an internal field
105  (
106  const this_bctype&
107  ) = delete;
108 
109  //- Clone with an internal field reference
111  (
113  ) const
114  {
115  return pointPatchField<vector>::Clone(*this, iF);
116  }
117 
118 
119  // Member Functions
121  // Evaluation functions
122 
123  //- Update the coefficients associated with the patch field
124  virtual void updateCoeffs();
125 
126 
127  //- Write
128  virtual void write(Ostream&) const;
129 
130 
131  // Member Operators
132 
133  //- Inherit assignment
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void write(Ostream &) const
Write.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
A FixedValue boundary condition for pointField.
Foam::pointPatchFieldMapper.
virtual autoPtr< pointPatchField< vector > > clone() const
No clone without an internal field reference.
friend Ostream & operator(Ostream &, const pointPatchField< vector > &)
TypeName("oscillatingDisplacement")
Runtime type information.
static autoPtr< pointPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
oscillatingDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Namespace for OpenFOAM.