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