Loading...
Searching...
No Matches
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
69/*---------------------------------------------------------------------------*\
70 Class uniformInterpolatedDisplacementPointPatchVectorField Declaration
71\*---------------------------------------------------------------------------*/
72
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 patch field onto a new patch
125 (
127 const pointPatch&,
130 );
131
132 //- Construct as copy setting internal field reference
134 (
137 );
138
139 //- Return a clone
141 {
142 return pointPatchField<vector>::Clone(*this);
143 }
144
145 //- Construct and return a clone setting internal field reference
147 (
149 ) const
150 {
151 return pointPatchField<vector>::Clone(*this, iF);
152 }
153
154
155 // Member functions
156
157 // Evaluation functions
158
159 //- Update the coefficients associated with the patch field
160 virtual void updateCoeffs();
161
162
163 //- Write
164 virtual void write(Ostream&) const;
165};
166
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170} // End namespace Foam
171
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174#endif
175
176// ************************************************************************* //
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:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
fixedValuePointPatchField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Abstract base class for interpolating in 1D.
Foam::pointPatchFieldMapper.
static autoPtr< pointPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Basic pointPatch represents a set of points from the mesh.
Definition pointPatch.H:67
uniformInterpolatedDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("uniformInterpolatedDisplacement")
Runtime type information.
virtual autoPtr< pointPatchField< vector > > clone() const
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:66
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
List< label > labelList
A List of labels.
Definition List.H:62
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68