mappedFixedValueFvPatchField.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) 2018 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::mappedFixedValueFvPatchField
29
30Group
31 grpGenericBoundaryConditions grpCoupledBoundaryConditions
32
33Description
34 This boundary condition maps the value at a set of cells or patch faces
35 back to *this.
36
37 The sample mode is set by the underlying mapping engine, provided by the
38 mappedPatchBase class.
39
40Usage
41 \table
42 Property | Description | Required | Default
43 field | Field name to be mapped | no | this field name
44 setAverage | Use average value | no | false
45 average | Average value to use if \c setAverage = yes | partly |
46 interpolationScheme | type of interpolation scheme | partly |
47 \endtable
48
49 Example of the boundary condition specification:
50 \verbatim
51 <patchName>
52 {
53 type mapped;
54 field T;
55 setAverage no;
56 average 0;
57 interpolationScheme cell;
58 value uniform 0;
59 }
60 \endverbatim
61
62 When employing the \c nearestCell sample mode, the user must also specify
63 the interpolation scheme using the \c interpolationScheme entry.
64
65 In case of interpolation (where scheme != cell) the limitation is that
66 there is only one value per cell. For example, if you have a cell with two
67 boundary faces and both faces sample into the cell, both faces will get the
68 same value.
69
70Note
71 It is not possible to sample internal faces since volume fields are not
72 defined on faces.
73
74See also
75 Foam::mappedPatchBase
76 Foam::interpolation
77 Foam::fixedValueFvPatchField
78
79SourceFiles
80 mappedFixedValueFvPatchField.C
81
82\*---------------------------------------------------------------------------*/
83
84#ifndef mappedFixedValueFvPatchField_H
85#define mappedFixedValueFvPatchField_H
86
88//#include "interpolation.H"
90
91// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92
93namespace Foam
94{
95
96/*---------------------------------------------------------------------------*\
97 Class mappedFixedValueFvPatchField Declaration
98\*---------------------------------------------------------------------------*/
99
100template<class Type>
101class mappedFixedValueFvPatchField
102:
103 public fixedValueFvPatchField<Type>,
104 public mappedPatchFieldBase<Type>
105{
106public:
107
108 //- Runtime type information
109 TypeName("mapped");
110
111
112 // Constructors
113
114 //- Construct from patch and internal field
116 (
117 const fvPatch&,
118 const DimensionedField<Type, volMesh>&
119 );
120
121 //- Construct from patch, internal field and dictionary
123 (
124 const fvPatch&,
126 const dictionary&
127 );
128
129 //- Construct by mapping given mappedFixedValueFvPatchField
130 // onto a new patch
132 (
134 const fvPatch&,
136 const fvPatchFieldMapper&
137 );
138
139 //- Construct as copy
141 (
143 );
144
145 //- Construct and return a clone
146 virtual tmp<fvPatchField<Type>> clone() const
147 {
149 (
151 );
152 }
153
154 //- Construct as copy setting internal field reference
156 (
159 );
160
161 //- Construct and return a clone setting internal field reference
163 (
165 ) const
166 {
168 (
170 );
171 }
172
173
174 // Member functions
175
176 // Evaluation functions
177
178 //- Update the coefficients associated with the patch field
179 virtual void updateCoeffs();
180
181
182 //- Write
183 virtual void write(Ostream&) const;
184};
185
187// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188
189} // End namespace Foam
190
191// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193#ifdef NoRepository
195#endif
196
197// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199#endif
200
201// ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition maps the value at a set of cells or patch faces back to *this.
TypeName("mapped")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
mappedFixedValueFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Construct and return a clone setting internal field reference.
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73