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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::solidBodyMotionDisplacementPointPatchVectorField
29
30Description
31 Enables the specification of a fixed value boundary condition using the
32 solid body motion functions.
33
34SourceFiles
35 solidBodyMotionDisplacementPointPatchVectorField.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef solidBodyMotionDisplacementPointPatchVectorField_H
40#define solidBodyMotionDisplacementPointPatchVectorField_H
41
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class solidBodyMotionDisplacementPointPatchVectorField Declaration
52\*---------------------------------------------------------------------------*/
55:
56 public fixedValuePointPatchVectorField
57{
58 // Private Data
59
60 //- The motion control function
62
63 mutable autoPtr<pointField> localPoints0Ptr_;
64
65
66public:
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
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// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Foam::pointPatchFieldMapper.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
Enables the specification of a fixed value boundary condition using the solid body motion functions.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const solidBodyMotionFunction & motion() const
Return the fluctuation scale.
virtual autoPtr< pointPatchField< vector > > clone() const
Construct and return a clone.
virtual autoPtr< pointPatchField< vector > > clone(const DimensionedField< vector, pointMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("solidBodyMotionDisplacement")
Runtime type information.
Base class for defining solid-body motions.
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73