OpenFOAM: API Guide
v2006
The open source CFD toolbox
volRegionI.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 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
\*---------------------------------------------------------------------------*/
28
29
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30
31
inline
const
Foam::functionObjects::volRegion::regionTypes
&
32
Foam::functionObjects::volRegion::regionType
()
const
33
{
34
#ifdef FULLDEBUG
35
if
(requireUpdate_)
36
{
37
FatalErrorInFunction
38
<<
"Retrieving cached values that are not up-to-date"
<<
nl
39
<<
exit
(
FatalError
);
40
}
41
#endif
42
43
return
regionType_
;
44
}
45
46
47
inline
Foam::label
Foam::functionObjects::volRegion::nCells
()
const
48
{
49
#ifdef FULLDEBUG
50
if
(requireUpdate_)
51
{
52
FatalErrorInFunction
53
<<
"Retrieving cached values that are not up-to-date"
<<
nl
54
<<
exit
(
FatalError
);
55
}
56
#endif
57
58
return
nCells_;
59
}
60
61
62
inline
Foam::scalar
Foam::functionObjects::volRegion::V
()
const
63
{
64
#ifdef FULLDEBUG
65
if
(requireUpdate_)
66
{
67
FatalErrorInFunction
68
<<
"Retrieving cached values that are not up-to-date"
<<
nl
69
<<
exit
(
FatalError
);
70
}
71
#endif
72
73
return
V_;
74
}
75
76
77
// ************************************************************************* //
Foam::functionObjects::volRegion::regionType
const regionTypes & regionType() const
Return the region type.
Definition:
volRegionI.H:32
Foam::functionObjects::volRegion::regionTypes
regionTypes
Region type enumeration.
Definition:
volRegion.H:145
Foam::functionObjects::volRegion::regionType_
regionTypes regionType_
Region type.
Definition:
volRegion.H:161
Foam::functionObjects::volRegion::nCells
label nCells() const
Return the number of cells selected in the region.
Definition:
volRegionI.H:47
Foam::FatalError
error FatalError
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition:
errorManip.H:130
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition:
error.H:372
Foam::nl
constexpr char nl
Definition:
Ostream.H:385
Foam::functionObjects::volRegion::V
scalar V() const
Return total volume of the selected region.
Definition:
volRegionI.H:62
src
finiteVolume
functionObjects
volRegion
volRegionI.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.