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 | Copyright (C) 2012 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::uniformInterpolatedDisplacementPointPatchVectorField
26 
27 Description
28  Interpolates pre-specified motion.
29 
30  Motion specified as pointVectorFields. E.g.
31 
32  walls
33  {
34  type uniformInterpolatedDisplacement;
35  value uniform (0 0 0);
36  fieldName wantedDisplacement;
37  interpolationScheme linear;
38  }
39 
40  This will scan the case for 'wantedDisplacement' pointVectorFields
41  and interpolate those in time (using 'linear' interpolation) to
42  obtain the current displacement.
43  The advantage of specifying displacement in this way is that it
44  automatically works through decomposePar.
45 
46 SourceFiles
47  uniformInterpolatedDisplacementPointPatchVectorField.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef uniformInterpolatedDisplacementPointPatchVectorField_H
52 #define uniformInterpolatedDisplacementPointPatchVectorField_H
53 
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 
61 class interpolationWeights;
62 
63 /*---------------------------------------------------------------------------*\
64  Class uniformInterpolatedDisplacementPointPatchVectorField Declaration
65 \*---------------------------------------------------------------------------*/
66 
68 :
69  public fixedValuePointPatchField<vector>
70 {
71  // Private data
72 
73  //- Name of displacement field
74  const word fieldName_;
75 
77 
78  //- Times with pre-specified displacement
80 
81  //- Times with pre-specified displacement
83 
84  //- User-specified interpolator
86 
87 
88  //- Cached interpolation times
90 
91  //- Cached interpolation weights
93 
94 public:
95 
96  //- Runtime type information
97  TypeName("uniformInterpolatedDisplacement");
98 
99 
100  // Constructors
101 
102  //- Construct from patch and internal field
104  (
105  const pointPatch&,
107  );
108 
109  //- Construct from patch, internal field and dictionary
111  (
112  const pointPatch&,
114  const dictionary&
115  );
116 
117  //- Construct by mapping given patchField<vector> onto a new patch
119  (
121  const pointPatch&,
123  const pointPatchFieldMapper&
124  );
125 
126  //- Construct and return a clone
127  virtual autoPtr<pointPatchField<vector> > clone() const
128  {
130  (
132  (
133  *this
134  )
135  );
136  }
137 
138  //- Construct as copy setting internal field reference
140  (
143  );
144 
145  //- Construct and return a clone setting internal field reference
147  (
149  ) const
150  {
152  (
154  (
155  *this,
156  iF
157  )
158  );
159  }
160 
161 
162  // Member functions
163 
164  // Evaluation functions
165 
166  //- Update the coefficients associated with the patch field
167  virtual void updateCoeffs();
168 
169 
170  //- Write
171  virtual void write(Ostream&) const;
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************************************************************* //
Foam::uniformInterpolatedDisplacementPointPatchVectorField::currentWeights_
scalarField currentWeights_
Cached interpolation weights.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:91
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::uniformInterpolatedDisplacementPointPatchVectorField::interpolationScheme_
const word interpolationScheme_
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:75
Foam::pointPatch
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:56
Foam::uniformInterpolatedDisplacementPointPatchVectorField::currentIndices_
labelList currentIndices_
Cached interpolation times.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:88
Foam::uniformInterpolatedDisplacementPointPatchVectorField::timeNames_
wordList timeNames_
Times with pre-specified displacement.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:78
Foam::pointPatchFieldMapper
Foam::pointPatchFieldMapper.
Definition: pointPatchFieldMapper.H:46
Foam::fixedValuePointPatchField
A FixedValue boundary condition for pointField.
Definition: fixedValuePointPatchField.H:49
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::uniformInterpolatedDisplacementPointPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.C:259
Foam::uniformInterpolatedDisplacementPointPatchVectorField::clone
virtual autoPtr< pointPatchField< vector > > clone() const
Construct and return a clone.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:126
fixedValuePointPatchField.H
Foam::uniformInterpolatedDisplacementPointPatchVectorField::fieldName_
const word fieldName_
Name of displacement field.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:73
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::uniformInterpolatedDisplacementPointPatchVectorField::uniformInterpolatedDisplacementPointPatchVectorField
uniformInterpolatedDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.C:44
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::uniformInterpolatedDisplacementPointPatchVectorField
Interpolates pre-specified motion.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:66
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::uniformInterpolatedDisplacementPointPatchVectorField::interpolatorPtr_
autoPtr< interpolationWeights > interpolatorPtr_
User-specified interpolator.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:84
Foam::uniformInterpolatedDisplacementPointPatchVectorField::timeVals_
scalarField timeVals_
Times with pre-specified displacement.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.H:81
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::uniformInterpolatedDisplacementPointPatchVectorField::TypeName
TypeName("uniformInterpolatedDisplacement")
Runtime type information.
Foam::uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: uniformInterpolatedDisplacementPointPatchVectorField.C:148
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51