mappedFixedPushedInternalValueFvPatchField.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::mappedFixedPushedInternalValueFvPatchField
26 
27 Group
28  grpGenericBoundaryConditions grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition maps the boundary values of a neighbour patch
32  field to the boundary and internal cell 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  Example of the boundary condition specification:
44  \verbatim
45  myPatch
46  {
47  type mappedFixedPushedInternalValue;
48  fieldName T;
49  setAverage no;
50  average 0;
51  value uniform 0;
52  }
53  \endverbatim
54 
55 Note
56  This boundary condition can only be applied to patches that are of
57  the \c mappedPolyPatch type.
58 
59 SeeAlso
60  Foam::mappedPatchBase
61  Foam::mappedPolyPatch
62  Foam::mappedFvPatch
63  Foam::mappedFixedValueFvPatchField
64 
65 SourceFiles
66  mappedFixedPushedInternalValueFvPatchField.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef mappedFixedPushedInternalValueFvPatchField_H
71 #define mappedFixedPushedInternalValueFvPatchField_H
72 
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 
80 /*---------------------------------------------------------------------------*\
81  Class mappedFixedPushedInternalValueFvPatchField Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 template<class Type>
85 class mappedFixedPushedInternalValueFvPatchField
86 :
87  public mappedFixedValueFvPatchField<Type>
88 {
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("mappedFixedPushedInternalValue");
94 
95 
96  // Constructors
97 
98  //- Construct from patch and internal field
100  (
101  const fvPatch&,
102  const DimensionedField<Type, volMesh>&
103  );
104 
105  //- Construct from patch, internal field and dictionary
107  (
108  const fvPatch&,
110  const dictionary&
111  );
112 
113  //- Construct by mapping given a
114  // mappedFixedPushedInternalValueFvPatchField onto a new patch
116  (
118  const fvPatch&,
120  const fvPatchFieldMapper&
121  );
122 
123  //- Construct as copy
125  (
127  );
128 
129  //- Construct and return a clone
130  virtual tmp<fvPatchField<Type> > clone() const
131  {
132  return tmp<fvPatchField<Type> >
133  (
135  (
136  *this
137  )
138  );
139  }
140 
141  //- Construct as copy setting internal field reference
143  (
146  );
147 
148  //- Construct and return a clone setting internal field reference
150  (
152  ) const
153  {
154  return tmp<fvPatchField<Type> >
155  (
157  (
158  *this,
159  iF
160  )
161  );
162  }
163 
164 
165  // Member functions
166 
167  // Evaluation functions
168 
169  //- Update the coefficients associated with the patch field
170  virtual void updateCoeffs();
171 
172  //- Write
173  virtual void write(Ostream&) const;
174 };
175 
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 } // End namespace Foam
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #ifdef NoRepository
185 #endif
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
mappedFixedPushedInternalValueFvPatchField.C
Foam::mappedFixedPushedInternalValueFvPatchField
This boundary condition maps the boundary values of a neighbour patch field to the boundary and inter...
Definition: mappedFixedPushedInternalValueFvPatchField.H:104
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::mappedFixedPushedInternalValueFvPatchField::mappedFixedPushedInternalValueFvPatchField
mappedFixedPushedInternalValueFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: mappedFixedPushedInternalValueFvPatchField.C:34
Foam::mappedFixedPushedInternalValueFvPatchField::TypeName
TypeName("mappedFixedPushedInternalValue")
Runtime type information.
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
mappedFixedValueFvPatchField.H
Foam::mappedFixedPushedInternalValueFvPatchField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: mappedFixedPushedInternalValueFvPatchField.C:96
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::mappedFixedPushedInternalValueFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: mappedFixedPushedInternalValueFvPatchField.C:114
Foam::mappedFixedPushedInternalValueFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: mappedFixedPushedInternalValueFvPatchField.H:149
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::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51