uniformFixedValueFvPatchField.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-2020 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::uniformFixedValueFvPatchField
29
30Group
31 grpGenericBoundaryConditions
32
33Description
34 This boundary condition provides a uniform fixed value condition.
35
36Usage
37 \table
38 Property | Description | Required | Default
39 uniformValue | uniform value | yes |
40 \endtable
41
42 Example of the boundary condition specification:
43 \verbatim
44 <patchName>
45 {
46 type uniformFixedValue;
47 uniformValue constant 0.2;
48 }
49 \endverbatim
50
51Note
52 The uniformValue entry is a PatchFunction1 type,
53 able to describe time and spatial varying functions.
54 The example above gives the usage for supplying a constant value.
55
56See also
57 Foam::Function1Types
58 Foam::fixedValueFvPatchField
59
60SourceFiles
61 uniformFixedValueFvPatchField.C
62
63\*---------------------------------------------------------------------------*/
64
65#ifndef uniformFixedValueFvPatchField_H
66#define uniformFixedValueFvPatchField_H
67
69#include "PatchFunction1.H"
70
71// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72
73namespace Foam
74{
75
76/*---------------------------------------------------------------------------*\
77 Class uniformFixedValueFvPatchField Declaration
78\*---------------------------------------------------------------------------*/
79
80template<class Type>
81class uniformFixedValueFvPatchField
82:
83 public fixedValueFvPatchField<Type>
84{
85 // Private Data
86
87 //- Value
88 autoPtr<PatchFunction1<Type>> uniformValue_;
89
91public:
92
93 //- Runtime type information
94 TypeName("uniformFixedValue");
95
96
97 // Constructors
98
99 //- Construct from patch and internal field
101 (
102 const fvPatch&,
104 );
105
106 //- Construct from patch and internal field and patch field
108 (
109 const fvPatch&,
111 const Field<Type>& fld
112 );
113
114 //- Construct from patch, internal field and dictionary
116 (
117 const fvPatch&,
119 const dictionary&
120 );
121
122 //- Construct by mapping onto a new patch
124 (
126 const fvPatch&,
128 const fvPatchFieldMapper&
129 );
130
131 //- Construct as copy
133 (
135 );
136
137 //- Construct and return a clone
138 virtual tmp<fvPatchField<Type>> clone() const
139 {
141 (
143 );
144 }
145
146 //- Construct as copy setting internal field reference
148 (
151 );
152
153 //- Construct and return a clone setting internal field reference
155 (
157 ) const
158 {
160 (
162 );
164
165
166 // Member functions
167
168 // Mapping functions
169
170 //- Map (and resize as needed) from self given a mapping object
171 virtual void autoMap
172 (
173 const fvPatchFieldMapper&
174 );
175
176 //- Reverse map the given fvPatchField onto this fvPatchField
177 virtual void rmap
178 (
179 const fvPatchField<Type>&,
180 const labelList&
181 );
182
183
184 //- Update the coefficients associated with the patch field
185 virtual void updateCoeffs();
186
187 //- Write
188 virtual void write(Ostream& os) const;
189};
190
191
192// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193
194} // End namespace Foam
195
196// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198#ifdef NoRepository
200#endif
201
202// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203
204#endif
205
206// ************************************************************************* //
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
Definition: Field.H:82
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
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.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:82
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
This boundary condition provides a uniform fixed value condition.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
TypeName("uniformFixedValue")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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.
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73