OpenFOAM: API Guide
v2112
The open source CFD toolbox
valveBank.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 OpenFOAM Foundation
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::valveBank
29
30
Description
31
A list of valves.
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef valveBank_H
36
#define valveBank_H
37
38
#include "
PtrList.H
"
39
#include "
engineValve.H
"
40
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43
namespace
Foam
44
{
45
46
/*---------------------------------------------------------------------------*\
47
Class valveBank Declaration
48
\*---------------------------------------------------------------------------*/
49
50
class
valveBank
51
:
52
public
PtrList
<engineValve>
53
{
54
// Private Member Functions
55
56
//- No copy construct
57
valveBank
(
const
valveBank
&) =
delete
;
58
59
//- No copy assignment
60
void
operator=(
const
valveBank
&) =
delete
;
61
62
63
public
:
64
65
// Constructors
66
67
//- Construct from Istream
68
valveBank
69
(
70
const
polyMesh
&
mesh
,
71
Istream
& is
72
)
73
{
74
PtrList<entry>
valveEntries(is);
75
76
setSize
(valveEntries.size());
77
78
forAll
(valveEntries, valveI)
79
{
80
valveI,
81
set
82
(
83
new
engineValve
84
(
85
valveEntries[valveI].keyword(),
86
mesh
,
87
valveEntries[valveI].
dict
()
88
)
89
);
90
}
91
}
92
93
94
//- Destructor
95
~valveBank
() =
default
;
96
};
97
98
99
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100
101
}
// End namespace Foam
102
103
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105
#endif
106
107
// ************************************************************************* //
engineValve.H
Foam::engineValve
Foam::engineValve.
Definition:
engineValve.H:57
Foam::PtrList< engineValve >::set
const engineValve * set(const label i) const
Return const pointer to element (can be nullptr),.
Definition:
PtrList.H:138
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition:
polyMesh.H:77
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition:
stdFoam.H:296
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition:
Istream.H:61
Foam::PtrList< engineValve >::setSize
void setSize(const label newLen)
Same as resize()
Definition:
PtrList.H:151
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition:
List.H:59
dict
dictionary dict
Definition:
searchingEngine.H:14
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
PtrList.H
Foam::valveBank
A list of valves.
Definition:
valveBank.H:49
Foam::valveBank::~valveBank
~valveBank()=default
Destructor.
src
engine
engineValve
valveBank.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.