uniformFixedValuePointPatchField.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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019 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::uniformFixedValuePointPatchField
29
30Description
31 Enables the specification of a uniform fixed value boundary condition.
32
33 Example of the boundary condition specification:
34 \verbatim
35 inlet
36 {
37 type uniformFixedValue;
38 uniformValue constant 0.2;
39 }
40 \endverbatim
41
42 The uniformValue entry is a Function1 type, able to describe time
43 varying functions. The example above gives the usage for supplying a
44 constant value.
45
46SourceFiles
47 uniformFixedValuePointPatchField.C
48
49\*---------------------------------------------------------------------------*/
50
51#ifndef uniformFixedValuePointPatchField_H
52#define uniformFixedValuePointPatchField_H
53
55#include "PatchFunction1.H"
56
57// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58
59namespace Foam
60{
61
62class polyPatch;
63
64/*---------------------------------------------------------------------------*\
65 Class uniformFixedValuePointPatchField Declaration
66\*---------------------------------------------------------------------------*/
67
68template<class Type>
70:
71 public fixedValuePointPatchField<Type>
72{
73 // Private Member Functions
74
75 static const polyPatch& getPatch(const pointPatch&);
76
77
78 // Private data
79
80 autoPtr<PatchFunction1<Type>> uniformValue_;
81
82
83public:
84
85 //- Runtime type information
86 TypeName("uniformFixedValue");
87
88
89 // Constructors
90
91 //- Construct from patch and internal field
93 (
94 const pointPatch&,
96 );
97
98 //- Construct from patch, internal field and dictionary
100 (
101 const pointPatch&,
103 const dictionary&
104 );
105
106 //- Construct by mapping given patchField<Type> onto a new patch
108 (
110 const pointPatch&,
113 );
114
115 //- Construct as copy
117 (
119 );
120
121 //- Construct and return a clone
122 virtual autoPtr<pointPatchField<Type>> clone() const
123 {
125 (
127 (
128 *this
129 )
130 );
131 }
132
133 //- Construct as copy setting internal field reference
135 (
138 );
139
140
141 //- Construct and return a clone setting internal field reference
143 (
145 ) const
146 {
148 (
150 (
151 *this,
152 iF
153 )
154 );
155 }
156
157
158 // Member functions
159
160 // Access
161
162 //- Return the uniform value
163 const Function1<Type>& uniformValue() const
164 {
165 return uniformValue_;
166 }
167
168
169 // Mapping functions
170
171 //- Map (and resize as needed) from self given a mapping object
172 virtual void autoMap
173 (
175 );
176
177 //- Reverse map the given fvPatchField onto this fvPatchField
178 virtual void rmap
179 (
181 const labelList&
182 );
183
184
185 // Evaluation functions
186
187 //- Update the coefficients associated with the patch field
188 virtual void updateCoeffs();
189
190
191 //- Write
192 virtual void write(Ostream&) const;
193};
194
195
196// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198} // End namespace Foam
199
200// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202#ifdef NoRepository
204#endif
205
206// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207
208#endif
209
210// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Definition: Function1.H:96
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.
Abstract base class for point-mesh patch fields.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
Enables the specification of a uniform fixed value boundary condition.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
TypeName("uniformFixedValue")
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.
const Function1< Type > & uniformValue() const
Return the uniform value.
virtual autoPtr< pointPatchField< Type > > clone() const
Construct and return a clone.
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73