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 patchField<vector> onto a new patch
91  (
93  const pointPatch&,
96  );
97 
98  //- Construct as copy
100  (
102  );
103 
104  //- Construct and return a clone
105  virtual autoPtr<pointPatchField<vector>> clone() const
106  {
108  (
110  (
111  *this
112  )
113  );
114  }
115 
116  //- Construct as copy setting internal field reference
118  (
121  );
122 
123 
124  //- Construct and return a clone setting internal field reference
126  (
128  ) const
129  {
131  (
133  (
134  *this,
135  iF
136  )
137  );
138  }
139 
140 
141  // Member functions
142 
143  // Access
144 
145  //- Return the fluctuation scale
146  const solidBodyMotionFunction& motion() const
147  {
148  return *SBMFPtr_;
149  }
150 
151  const pointField& localPoints0() const;
152 
153 
154  // Evaluation Functions
155 
156  //- Update the coefficients associated with the patch field
157  virtual void updateCoeffs();
158 
159 
160  //- Write
161  virtual void write(Ostream&) const;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
solidBodyMotionFunction.H
Foam::solidBodyMotionDisplacementPointPatchVectorField
Enables the specification of a fixed value boundary condition using the solid body motion functions.
Definition: solidBodyMotionDisplacementPointPatchVectorField.H:53
Foam::pointPatch
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:58
Foam::pointPatchFieldMapper
Foam::pointPatchFieldMapper.
Definition: pointPatchFieldMapper.H:48
Foam::Field< vector >
Foam::solidBodyMotionFunction
Base class for defining solid-body motions.
Definition: solidBodyMotionFunction.H:63
Foam::solidBodyMotionDisplacementPointPatchVectorField::motion
const solidBodyMotionFunction & motion() const
Return the fluctuation scale.
Definition: solidBodyMotionDisplacementPointPatchVectorField.H:145
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::solidBodyMotionDisplacementPointPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: solidBodyMotionDisplacementPointPatchVectorField.C:181
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fixedValuePointPatchFields.H
Foam::solidBodyMotionDisplacementPointPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: solidBodyMotionDisplacementPointPatchVectorField.C:162
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::solidBodyMotionDisplacementPointPatchVectorField::TypeName
TypeName("solidBodyMotionDisplacement")
Runtime type information.
Foam::solidBodyMotionDisplacementPointPatchVectorField::solidBodyMotionDisplacementPointPatchVectorField
solidBodyMotionDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
Definition: solidBodyMotionDisplacementPointPatchVectorField.C:43
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::solidBodyMotionDisplacementPointPatchVectorField::localPoints0
const pointField & localPoints0() const
Definition: solidBodyMotionDisplacementPointPatchVectorField.C:137
Foam::solidBodyMotionDisplacementPointPatchVectorField::clone
virtual autoPtr< pointPatchField< vector > > clone() const
Construct and return a clone.
Definition: solidBodyMotionDisplacementPointPatchVectorField.H:104
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54