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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::mappedFixedInternalValueFvPatchField
29 
30 Group
31  grpGenericBoundaryConditions grpCoupledBoundaryConditions
32 
33 Description
34  This boundary condition maps the boundary and internal values of a
35  neighbour patch field to the boundary and internal values of *this.
36 
37 Usage
38  \table
39  Property | Description | Required | Default
40  field | name of field to be mapped | no | this field name
41  setAverage | Use average value | no | false
42  average | Average value to use if \c setAverage = yes | partly |
43  \endtable
44 
45  \verbatim
46  <patchName>
47  {
48  type mappedFixedInternalValue;
49  field T;
50  setAverage false;
51  average 0;
52  value uniform 0;
53  }
54  \endverbatim
55 
56 Note
57  This boundary condition can only be applied to patches that are of
58  the \c mappedPolyPatch type.
59 
60 See also
61  Foam::mappedPatchBase
62  Foam::mappedPolyPatch
63  Foam::mappedFvPatch
64  Foam::mappedFixedValueFvPatchField
65 
66 SourceFiles
67  mappedFixedInternalValueFvPatchField.txx
68 
69 \*---------------------------------------------------------------------------*/
70 
71 #ifndef Foam_mappedFixedInternalValueFvPatchField_H
72 #define Foam_mappedFixedInternalValueFvPatchField_H
73 
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 
81 /*---------------------------------------------------------------------------*\
82  Class mappedFixedInternalValueFvPatchField Declaration
83 \*---------------------------------------------------------------------------*/
84 
85 template<class Type>
86 class mappedFixedInternalValueFvPatchField
87 :
88  public mappedFixedValueFvPatchField<Type>
89 {
90  typedef mappedFixedInternalValueFvPatchField<Type> this_bctype;
91  typedef mappedFixedValueFvPatchField<Type> parent_bctype;
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("mappedFixedInternalValue");
97 
98 
99  // Constructors
100 
101  //- Construct from patch and internal field
103  (
104  const fvPatch&,
106  );
107 
108  //- Construct from patch, internal field and dictionary
110  (
111  const fvPatch&,
113  const dictionary&
114  );
115 
116  //- Construct by mapping onto a new patch
118  (
119  const this_bctype&,
120  const fvPatch&,
122  const fvPatchFieldMapper&
123  );
124 
125  //- Construct as copy setting internal field reference
127  (
128  const this_bctype&,
130  );
131 
132  //- No copy without an internal field
134 
135  //- Clone with an internal field reference
137  (
139  ) const
140  {
141  return fvPatchField<Type>::Clone(*this, iF);
142  }
143 
144 
145  // Member functions
146 
147  //- Update the coefficients associated with the patch field
148  virtual void updateCoeffs();
149 
150  //- Write
151  virtual void write(Ostream& os) const;
152 
153 
154  // Member Operators
155 
156  //- Inherit assignment
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 #ifdef NoRepository
168  #include "mappedFixedInternalValueFvPatchField.txx"
169 #endif
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
virtual void write(Ostream &os) const
Write.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
TypeName("mappedFixedInternalValue")
Runtime type information.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:635
A FieldMapper for finite-volume patch fields.
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:56
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: HashPtrTable.H:50
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Namespace for OpenFOAM.
virtual tmp< fvPatchField< Type > > clone() const
No clone without an internal field reference.
Definition: fvPatchField.H:610