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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::PDRpatchDef
29 
30 Description
31  Bookkeeping for patch definitions
32 
33 SourceFiles
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 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class PDRpatchDef Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class PDRpatchDef
55 {
56 public:
57 
58  //- Patch predefines
59  enum predefined
60  {
64  LAST_PREDEFINED = 2, // First user patch number will be 1 more
65  NUM_PREDEFINED = 3
66  };
67 
68  //- Names for predefined types
69  static const Enum<predefined> names;
70 
71 
72  // Data Members
73 
75 
76  label patchType;
77 
78  scalar blowoffPress;
79 
80  scalar blowoffTime;
81 
82 
83  // Constructors
84 
85  //- Construct null
86  PDRpatchDef()
87  :
88  patchName(),
89  patchType(0),
90  blowoffPress(0),
91  blowoffTime(0)
92  {}
93 
94  //- Construct with given patch name
95  explicit PDRpatchDef(const word& name)
96  :
97  patchName(name),
98  patchType(0),
99  blowoffPress(0),
100  blowoffTime(0)
101  {}
102 
103 
104  //- Construct with given patch name
105  PDRpatchDef& operator=(const PDRpatchDef&) = default;
106  PDRpatchDef& operator=(PDRpatchDef&&) = default;
107 
108  //- Assign new patch name
109  void operator=(const std::string& newName);
110 };
111 
112 
113 typedef PDRpatchDef PATCH;
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
Foam::Enum< predefined >
Foam::PDRpatchDef::PDRpatchDef
PDRpatchDef(const word &name)
Construct with given patch name.
Definition: PDRpatchDef.H:94
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::PDRpatchDef::NUM_PREDEFINED
Definition: PDRpatchDef.H:64
string.H
Foam::PDRpatchDef::WALL_PATCH
Definition: PDRpatchDef.H:62
Foam::PDRpatchDef::names
static const Enum< predefined > names
Names for predefined types.
Definition: PDRpatchDef.H:68
Foam::PDRpatchDef::patchName
word patchName
Definition: PDRpatchDef.H:73
Foam::PDRpatchDef::blowoffTime
scalar blowoffTime
Definition: PDRpatchDef.H:79
Foam::PDRpatchDef::blowoffPress
scalar blowoffPress
Definition: PDRpatchDef.H:77
Foam::PDRpatchDef::BLOCKED_FACE
Definition: PDRpatchDef.H:60
Foam::PDRpatchDef::operator=
PDRpatchDef & operator=(const PDRpatchDef &)=default
Construct with given patch name.
scalar.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::PDRpatchDef::LAST_PREDEFINED
Definition: PDRpatchDef.H:63
Foam::PDRpatchDef::PDRpatchDef
PDRpatchDef()
Construct null.
Definition: PDRpatchDef.H:85
Foam::PDRpatchDef
Bookkeeping for patch definitions.
Definition: PDRpatchDef.H:53
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::PDRpatchDef::MERGING_PATCH
Definition: PDRpatchDef.H:61
Foam::PATCH
PDRpatchDef PATCH
Definition: PDRpatchDef.H:112
Foam::PDRpatchDef::predefined
predefined
Patch predefines.
Definition: PDRpatchDef.H:58
Foam::PDRpatchDef::patchType
label patchType
Definition: PDRpatchDef.H:75
Enum.H