mappedFixedInternalValueFvPatchField.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) 2011-2016 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::mappedFixedInternalValueFvPatchField
26 
27 Group
28  grpGenericBoundaryConditions grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition maps the boundary and internal values of a
32  neighbour patch field to the boundary and internal values of *this.
33 
34 Usage
35  \table
36  Property | Description | Required | Default value
37  fieldName | name of field to be mapped | no | this field name
38  setAverage | flag to activate setting of average value | yes |
39  average | average value to apply if \c setAverage = yes | yes |
40  \endtable
41 
42  \verbatim
43  <patchName>
44  {
45  type mappedFixedInternalValue;
46  fieldName T;
47  setAverage no;
48  average 0;
49  value uniform 0;
50  }
51  \endverbatim
52 
53 Note
54  This boundary condition can only be applied to patches that are of
55  the \c mappedPolyPatch type.
56 
57 See also
58  Foam::mappedPatchBase
59  Foam::mappedPolyPatch
60  Foam::mappedFvPatch
61  Foam::mappedFixedValueFvPatchField
62 
63 SourceFiles
64  mappedFixedInternalValueFvPatchField.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef mappedFixedInternalValueFvPatchField_H
69 #define mappedFixedInternalValueFvPatchField_H
70 
72 
73 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 
75 namespace Foam
76 {
77 
78 /*---------------------------------------------------------------------------*\
79  Class mappedFixedInternalValueFvPatchField Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 template<class Type>
83 class mappedFixedInternalValueFvPatchField
84 :
85  public mappedFixedValueFvPatchField<Type>
86 {
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("mappedFixedInternalValue");
92 
93 
94  // Constructors
95 
96  //- Construct from patch and internal field
98  (
99  const fvPatch&,
100  const DimensionedField<Type, volMesh>&
101  );
103  //- Construct from patch, internal field and dictionary
105  (
106  const fvPatch&,
108  const dictionary&
109  );
110 
111  //- Construct by mapping given
112  // mappedFixedInternalValueFvPatchField onto a new patch
114  (
116  const fvPatch&,
118  const fvPatchFieldMapper&
119  );
120 
121  //- Construct as copy
123  (
125  );
126 
127  //- Construct and return a clone
128  virtual tmp<fvPatchField<Type>> clone() const
129  {
130  return tmp<fvPatchField<Type>>
131  (
133  );
134  }
135 
136  //- Construct as copy setting internal field reference
138  (
141  );
142 
143  //- Construct and return a clone setting internal field reference
145  (
147  ) const
148  {
149  return tmp<fvPatchField<Type>>
150  (
152  );
153  }
154 
155 
156  // Member functions
157 
158  // Evaluation functions
159 
160  //- Update the coefficients associated with the patch field
161  virtual void updateCoeffs();
162 
163  //- Write
164  virtual void write(Ostream&) const;
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #ifdef NoRepository
176 #endif
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
TypeName("mappedFixedInternalValue")
Runtime type information.
Foam::fvPatchFieldMapper.
mappedFixedInternalValueFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
This boundary condition maps the boundary and internal values of a neighbour patch field to the bound...
Namespace for OpenFOAM.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.