uniformInterpolatedDisplacementPointPatchVectorField.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) 2012-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::uniformInterpolatedDisplacementPointPatchVectorField
28
29Description
30 Interpolates pre-specified motion.
31
32 Motion specified as pointVectorFields.
33
34Usage
35 Example:
36 \verbatim
37 walls
38 {
39 type uniformInterpolatedDisplacement;
40 value uniform (0 0 0);
41 field wantedDisplacement;
42 interpolationScheme linear;
43 }
44 \endverbatim
45
46 This will scan the case for \a wantedDisplacement pointVectorFields
47 and interpolate those in time (using \c linear interpolation) to
48 obtain the current displacement.
49 The advantage of specifying displacement in this way is that it
50 automatically works through decomposePar.
51
52SourceFiles
53 uniformInterpolatedDisplacementPointPatchVectorField.C
54
55\*---------------------------------------------------------------------------*/
56
57#ifndef uniformInterpolatedDisplacementPointPatchVectorField_H
58#define uniformInterpolatedDisplacementPointPatchVectorField_H
59
61
62// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63
64namespace Foam
65{
66
67class interpolationWeights;
68
69/*---------------------------------------------------------------------------*\
70 Class uniformInterpolatedDisplacementPointPatchVectorField Declaration
71\*---------------------------------------------------------------------------*/
74:
75 public fixedValuePointPatchField<vector>
76{
77 // Private data
78
79 //- Name of displacement field
80 const word fieldName_;
81
82 const word interpolationScheme_;
83
84 //- Times with pre-specified displacement
85 wordList timeNames_;
86
87 //- Times with pre-specified displacement
88 scalarField timeVals_;
89
90 //- User-specified interpolator
91 autoPtr<interpolationWeights> interpolatorPtr_;
92
93
94 //- Cached interpolation times
95 labelList currentIndices_;
96
97 //- Cached interpolation weights
98 scalarField currentWeights_;
99
100public:
101
102 //- Runtime type information
103 TypeName("uniformInterpolatedDisplacement");
104
105
106 // Constructors
107
108 //- Construct from patch and internal field
110 (
111 const pointPatch&,
113 );
114
115 //- Construct from patch, internal field and dictionary
117 (
118 const pointPatch&,
120 const dictionary&
121 );
122
123 //- Construct by mapping given patchField<vector> onto a new patch
125 (
127 const pointPatch&,
130 );
131
132 //- Construct and return a clone
134 {
136 (
138 (
139 *this
140 )
141 );
142 }
143
144 //- Construct as copy setting internal field reference
146 (
149 );
150
151 //- Construct and return a clone setting internal field reference
153 (
155 ) const
156 {
158 (
160 (
161 *this,
162 iF
163 )
164 );
165 }
166
167
168 // Member functions
169
170 // Evaluation functions
171
172 //- Update the coefficients associated with the patch field
173 virtual void updateCoeffs();
174
175
176 //- Write
177 virtual void write(Ostream&) const;
178};
179
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183} // End namespace Foam
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187#endif
188
189// ************************************************************************* //
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
A FixedValue boundary condition for pointField.
Foam::pointPatchFieldMapper.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("uniformInterpolatedDisplacement")
Runtime type information.
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.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73