PDRpatchDef.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) 2016 Shell Research Ltd.
9 Copyright (C) 2019 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::PDRpatchDef
29
30Description
31 Bookkeeping for patch definitions
32
33SourceFiles
34 PDRpatchDef.H
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef PDRpatchDef_H
39#define PDRpatchDef_H
40
41#include "string.H"
42#include "scalar.H"
43#include "Enum.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class PDRpatchDef Declaration
52\*---------------------------------------------------------------------------*/
54class PDRpatchDef
55{
56public:
57
58 //- Patch predefines
59 enum predefined
60 {
64 LAST_PREDEFINED = 2, // First user patch number will be 1 more
66 };
67
68 //- Names for predefined types
69 static const Enum<predefined> names;
70
71
72 // Data Members
76 label patchType;
78 scalar blowoffPress;
80 scalar blowoffTime;
81
82
83 // Constructors
84
85 //- Construct null
87 :
88 patchName(),
89 patchType(0),
90 blowoffPress(0),
92 {}
93
94 //- Construct with given patch name
95 explicit PDRpatchDef(const word& name)
96 :
98 patchType(0),
99 blowoffPress(0),
100 blowoffTime(0)
101 {}
102
103
104 //- Construct with given patch name
106 PDRpatchDef& operator=(PDRpatchDef&&) = default;
107
108 //- Assign new patch name
109 void operator=(const std::string& newName);
110};
111
113typedef PDRpatchDef PATCH;
114
115// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116
117} // End namespace Foam
118
119// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121#endif
122
123// ************************************************************************* //
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
Bookkeeping for patch definitions.
Definition: PDRpatchDef.H:54
void operator=(const std::string &newName)
Assign new patch name.
PDRpatchDef & operator=(const PDRpatchDef &)=default
Construct with given patch name.
static const Enum< predefined > names
Names for predefined types.
Definition: PDRpatchDef.H:68
PDRpatchDef(const word &name)
Construct with given patch name.
Definition: PDRpatchDef.H:94
predefined
Patch predefines.
Definition: PDRpatchDef.H:59
PDRpatchDef & operator=(PDRpatchDef &&)=default
PDRpatchDef()
Construct null.
Definition: PDRpatchDef.H:85
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
PDRpatchDef PATCH
Definition: PDRpatchDef.H:112