patchExprFieldBase.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-2018 Bernhard Gschaider
9 Copyright (C) 2019-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::expressions::patchExprFieldBase
29
30Description
31 Base class for managing patches with expressions.
32 The expected input supports value, gradient and mixed conditions.
33
34Usage
35 \table
36 Property | Description | Required | Default
37 valueExpr | expression for uniformValue | partly | 0
38 gradientExpr | expression for uniformGradient | partly | 0
39 fractionExpr | expression for valueFraction | partly | depends
40 \endtable
41
42SourceFiles
43 patchExprFieldBase.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef expressions_patchExprFieldBase_H
48#define expressions_patchExprFieldBase_H
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52#include "dictionary.H"
53#include "exprString.H"
54
55namespace Foam
56{
57namespace expressions
58{
59
60/*---------------------------------------------------------------------------*\
61 Class patchExprFieldBase Declaration
62\*---------------------------------------------------------------------------*/
63
64class patchExprFieldBase
65{
66protected:
67
68 // Protected Types
69
70 //- Enumeration of expected expressions
71 enum expectedTypes
72 {
73 VALUE_TYPE = 1,
74 GRADIENT_TYPE = 2,
75 MIXED_TYPE = 3
76 };
77
78
79 // Protected Data
80
81 //- Add debugging
82 bool debug_;
84 //- Slightly dodgy concept here
86
87 // The expressions
91
93private:
94
95 // Private Member Functions
96
97 //- Read expressions from dictionary
98 void readExpressions
99 (
100 const dictionary& dict,
101 enum expectedTypes expectedType,
102 bool wantPointData = false
103 );
105
106public:
108 // Generated Methods: copy construct, copy assignment
110
111 // Constructors
112
113 //- Default construct
115
116 //- Construct from dictionary
117 explicit patchExprFieldBase
118 (
119 const dictionary& dict,
120 enum expectedTypes expectedType = expectedTypes::VALUE_TYPE,
121 bool wantPointData = false
122 );
123
124
125 // Member Functions
126
127 //- Write
128 void write(Ostream& os) const;
129};
130
131
132// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133
134} // End namespace expressions
135} // End namespace Foam
136
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139#endif
140
141// ************************************************************************* //
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
Base class for managing patches with expressions. The expected input supports value,...
bool evalOnConstruct_
Slightly dodgy concept here.
expectedTypes
Enumeration of expected expressions.
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
dictionary dict