solidBodyMotionDisplacementPointPatchVectorField.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) 2013-2016 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::solidBodyMotionDisplacementPointPatchVectorField
29 
30 Description
31  Enables the specification of a fixed value boundary condition using the
32  solid body motion functions.
33 
34 SourceFiles
35  solidBodyMotionDisplacementPointPatchVectorField.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef solidBodyMotionDisplacementPointPatchVectorField_H
40 #define solidBodyMotionDisplacementPointPatchVectorField_H
41 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class solidBodyMotionDisplacementPointPatchVectorField Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public fixedValuePointPatchVectorField
57 {
58  // Private Data
59 
60  //- The motion control function
62 
63  mutable autoPtr<pointField> localPoints0Ptr_;
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("solidBodyMotionDisplacement");
70 
71 
72  // Constructors
73 
74  //- Construct from patch and internal field
76  (
77  const pointPatch&,
79  );
80 
81  //- Construct from patch, internal field and dictionary
83  (
84  const pointPatch&,
86  const dictionary&
87  );
88 
89  //- Construct by mapping given patch field onto a new patch
91  (
93  const pointPatch&,
96  );
97 
98  //- Construct as copy
100  (
102  );
103 
104  //- Construct as copy setting internal field reference
106  (
109  );
110 
111 
112  //- Return a clone
113  virtual autoPtr<pointPatchField<vector>> clone() const
114  {
115  return pointPatchField<vector>::Clone(*this);
116  }
117 
118  //- Construct and return a clone setting internal field reference
120  (
122  ) const
123  {
125  }
126 
127 
128  // Member functions
129 
130  // Access
131 
132  //- Return the fluctuation scale
134  {
135  return *SBMFPtr_;
136  }
137 
138  const pointField& localPoints0() const;
139 
140 
141  // Evaluation Functions
142 
143  //- Update the coefficients associated with the patch field
144  virtual void updateCoeffs();
145 
146 
147  //- Write
148  virtual void write(Ostream&) const;
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Foam::pointPatchFieldMapper.
const solidBodyMotionFunction & motion() const
Return the fluctuation scale.
Base class for defining solid-body motions.
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
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:61
Enables the specification of a fixed value boundary condition using the solid body motion functions...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
solidBodyMotionDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
virtual autoPtr< pointPatchField< vector > > clone() const
Return a clone.
TypeName("solidBodyMotionDisplacement")
Runtime type information.
Namespace for OpenFOAM.