exprFixedValueFvPatchField.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) 2019-2021 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::exprFixedValueFvPatchField
28
29Description
30 A fixed value boundary condition with expressions.
31
32Usage
33 \table
34 Property | Description | Required | Default
35 value | fixed value | yes |
36 valueExpr | expression for uniformValue | yes |
37 \endtable
38
39Note
40 Can also just use uniformFixedValueFvPatchField with an expression
41 for the PatchFunction1.
42
43SourceFiles
44 exprFixedValueFvPatchField.C
45
46\*---------------------------------------------------------------------------*/
47
48#ifndef exprFixedValueFvPatchField_H
49#define exprFixedValueFvPatchField_H
50
52#include "patchExprFieldBase.H"
53#include "patchExprDriver.H"
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace Foam
58{
59
60/*---------------------------------------------------------------------------*\
61 Class exprFixedValueFvPatchField Declaration
62\*---------------------------------------------------------------------------*/
63
64template<class Type>
65class exprFixedValueFvPatchField
66:
67 public fixedValueFvPatchField<Type>,
68 public expressions::patchExprFieldBase
69{
70 //- The parent boundary condition type
71 typedef fixedValueFvPatchField<Type> parent_bctype;
72
73
74protected:
75
76 // Protected Data
77
78 //- Dictionary contents for the boundary condition
80
81 //- The expression driver
83
84
85 // Protected Member Functions
86
87 //- Set debug ON if "debug" is enabled
88 void setDebug();
89
90
91public:
92
93 //- Runtime type information
94 TypeName("exprFixedValue");
95
97 // Constructors
98
99 //- Construct from patch and internal field
101 (
102 const fvPatch& p,
104 );
105
106 //- Construct from patch, internal field and dictionary
109 const fvPatch&,
111 const dictionary& dict,
112 const bool valueRequired=true
113 );
114
115 //- Construct by mapping onto a new patch
117 (
119 const fvPatch&,
121 const fvPatchFieldMapper&
122 );
123
124 //- Construct as copy
126 (
128 );
129
130
131 //- Construct and return a clone
132 virtual tmp<fvPatchField<Type>> clone() const
133 {
135 (
137 );
138 }
139
140 //- Construct as copy setting internal field reference
142 (
145 );
147 //- Construct and return a clone setting internal field reference
149 (
151 ) const
152 {
154 (
156 );
157 }
158
159
160 // Member Functions
161
162 //- Update the coefficients associated with the patch field
163 virtual void updateCoeffs();
164
165 //- Write
166 virtual void write(Ostream& os) const;
167};
168
169
170// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172} // End namespace Foam
173
174// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175
176#ifdef NoRepository
178#endif
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182#endif
183
184// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A fixed value boundary condition with expressions.
dictionary dict_
Dictionary contents for the boundary condition.
TypeName("exprFixedValue")
Runtime type information.
expressions::patchExpr::parseDriver driver_
The expression driver.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
void setDebug()
Set debug ON if "debug" is enabled.
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.
Base class for managing patches with expressions. The expected input supports value,...
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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73