faceSetOptionI.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) 2019-2021 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29
30inline Foam::scalar Foam::fa::faceSetOption::timeStart() const noexcept
31{
32 return timeStart_;
33}
34
35
37{
38 return duration_;
39}
40
41
42inline bool Foam::fa::faceSetOption::inTimeLimits(const scalar timeValue) const
43{
44 return
45 (
46 (timeStart_ < 0)
47 ||
48 (
49 (mesh_.time().value() >= timeStart_)
50 && (mesh_.time().value() <= (timeStart_ + duration_))
51 )
52 );
53}
54
55
58{
59 return selectionMode_;
60}
61
62
64{
65 return selectionMode_ != selectionModeType::smAll;
66}
67
68
69inline Foam::scalar Foam::fa::faceSetOption::A() const noexcept
70{
71 return A_;
72}
73
74
76{
77 return faces_;
78}
79
80
81inline Foam::scalar Foam::fa::faceSetOption::timeStart(scalar val) noexcept
82{
83 scalar old(timeStart_);
84 timeStart_ = val;
85 return old;
86}
87
88
89inline Foam::scalar Foam::fa::faceSetOption::duration(scalar val) noexcept
90{
91 scalar old(duration_);
92 duration_ = val;
93 return old;
94}
95
96
97// ************************************************************************* //
scalar timeStart() const noexcept
Return const access to the time start.
scalar duration() const noexcept
Return const access to the duration.
selectionModeType
Enumeration for selection mode types.
selectionModeType selectionMode() const noexcept
Return const access to the face selection mode.
bool useSubMesh() const noexcept
True if sub-selection should be used.
scalar timeStart_
Time start.
const labelList & faces() const noexcept
Return const access to the face selection.
scalar A() const noexcept
Return const access to the total face area.
bool inTimeLimits(const scalar timeValue) const
Return true if within time limits.
const direction noexcept
Definition: Scalar.H:223