timeVaryingMappedFixedValuePointPatchField.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::timeVaryingMappedFixedValuePointPatchField
28
29Description
30 A time-varying form of a mapped fixed value boundary condition.
31
32See also
33 Foam::timeVaryingMappedFixedValueFvPatchField
34
35SourceFiles
36 timeVaryingMappedFixedValuePointPatchField.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef timeVaryingMappedFixedValuePointPatchField_H
41#define timeVaryingMappedFixedValuePointPatchField_H
42
44#include "instantList.H"
46#include "Function1.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class timeVaryingMappedFixedValuePointPatchField Declaration
55\*---------------------------------------------------------------------------*/
56
57template<class Type>
59:
60 public fixedValuePointPatchField<Type>
61{
62 // Private data
63
64 //- Name of the field data table, defaults to the name of the field
65 word fieldTableName_;
66
67 //- If true adjust the mapped field to maintain average value
68 Switch setAverage_;
69
70 //- Fraction of perturbation (fraction of bounding box) to add
71 scalar perturb_;
72
73 //- Interpolation scheme to use
74 word mapMethod_;
75
76 //- 2D interpolation (for 'planarInterpolation' mapMethod)
78
79 //- List of boundaryData time directories
80 instantList sampleTimes_;
81
82 //- Current starting index in sampleTimes
83 label startSampleTime_;
84
85 //- Interpolated values from startSampleTime
86 Field<Type> startSampledValues_;
87
88 //- If setAverage: starting average value
89 Type startAverage_;
90
91 //- Current end index in sampleTimes
92 label endSampleTime_;
93
94 //- Interpolated values from endSampleTime
95 Field<Type> endSampledValues_;
96
97 //- If setAverage: end average value
98 Type endAverage_;
99
100 //- Time varying offset values to interpolated data
102
103
104public:
105
106 //- Runtime type information
107 TypeName("timeVaryingMappedFixedValue");
108
109
110 // Constructors
111
112 //- Construct from patch and internal field
114 (
115 const pointPatch&,
117 );
118
119 //- Construct from patch, internal field and dictionary
121 (
122 const pointPatch&,
124 const dictionary&
125 );
126
127 //- Construct by mapping given patch field onto a new patch
129 (
131 const pointPatch&,
134 );
135
136 //- Construct as copy
138 (
140 );
141
142 //- Construct and return a clone
143 virtual autoPtr<pointPatchField<Type>> clone() const
144 {
146 (
148 );
149 }
150
151 //- Construct as copy setting internal field reference
153 (
156 );
157
158 //- Construct and return a clone setting internal field reference
160 (
162 ) const
163 {
165 (
167 );
168 }
169
170
171 // Member functions
172
173 // Utility functions
174
175 //- Find boundary data inbetween current time and interpolate
176 void checkTable();
177
178
179 // Mapping functions
180
181 //- Map (and resize as needed) from self given a mapping object
182 virtual void autoMap
183 (
185 );
186
187 //- Reverse map the given PointPatchField onto
188 // this PointPatchField
189 virtual void rmap
190 (
192 const labelList&
193 );
194
195
196 // Evaluation functions
197
198 //- Update the coefficients associated with the patch field
199 virtual void updateCoeffs();
200
201
202 //- Write
203 virtual void write(Ostream&) const;
204};
205
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209} // End namespace Foam
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213#ifdef NoRepository
215#endif
216
217// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218
219#endif
220
221// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
Definition: Field.H:82
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
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.
Abstract base class for point-mesh patch fields.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
A time-varying form of a mapped fixed value boundary condition.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
TypeName("timeVaryingMappedFixedValue")
Runtime type information.
virtual autoPtr< pointPatchField< Type > > clone(const DimensionedField< Type, pointMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
void checkTable()
Find boundary data inbetween current time and interpolate.
virtual autoPtr< pointPatchField< Type > > clone() const
Construct and return a clone.
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given PointPatchField onto.
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