cellSetOptionI.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-2015 OpenFOAM Foundation
9 Copyright (C) 2021 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
27\*---------------------------------------------------------------------------*/
28
29// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30
31inline Foam::scalar Foam::fv::cellSetOption::timeStart() const noexcept
32{
33 return timeStart_;
34}
35
36
38{
39 return duration_;
40}
41
42
43inline bool Foam::fv::cellSetOption::inTimeLimits(const scalar timeValue) const
44{
45 return
46 (
47 (timeStart_ < 0)
48 ||
49 (
50 (mesh_.time().value() >= timeStart_)
51 && (mesh_.time().value() <= (timeStart_ + duration_))
52 )
53 );
54}
55
56
59{
60 return selectionMode_;
61}
62
63
65{
66 return selectionMode_ != selectionModeType::smAll;
67}
68
69
70inline Foam::scalar Foam::fv::cellSetOption::V() const noexcept
71{
72 return V_;
73}
74
75
77{
78 return cells_;
79}
80
81
82inline Foam::scalar Foam::fv::cellSetOption::timeStart(scalar val) noexcept
83{
84 scalar old(timeStart_);
85 timeStart_ = val;
86 return old;
87}
88
89
90inline Foam::scalar Foam::fv::cellSetOption::duration(scalar val) noexcept
91{
92 scalar old(duration_);
93 duration_ = val;
94 return old;
95}
96
97
98// ************************************************************************* //
scalar timeStart() const noexcept
Return const access to the time start.
scalar duration() const noexcept
Return const access to the duration.
scalar V() const noexcept
Return const access to the total cell volume.
selectionModeType
Enumeration for selection mode types.
bool useSubMesh() const noexcept
True if sub-selection should be used.
scalar timeStart_
Start time of fvOption.
const labelList & cells() const noexcept
Return const access to the cell selection.
selectionModeType selectionMode() const noexcept
Return the cell selection mode.
bool inTimeLimits(const scalar timeValue) const
True if within time limits.
const direction noexcept
Definition: Scalar.H:223