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 -------------------------------------------------------------------------------
10 License
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 
30 inline Foam::scalar Foam::fa::faceSetOption::timeStart() const noexcept
31 {
32  return timeStart_;
33 }
34 
35 
36 inline Foam::scalar Foam::fa::faceSetOption::duration() const noexcept
37 {
38  return duration_;
39 }
40 
41 
42 inline 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 
63 inline bool Foam::fa::faceSetOption::useSubMesh() const noexcept
64 {
65  return selectionMode_ != selectionModeType::smAll;
66 }
67 
68 
69 inline const Foam::word& Foam::fa::faceSetOption::faceSetName() const noexcept
70 {
71  return faceSetName_;
72 }
73 
74 
75 inline Foam::scalar Foam::fa::faceSetOption::A() const noexcept
76 {
77  return A_;
78 }
79 
80 
81 inline const Foam::labelList& Foam::fa::faceSetOption::faces() const noexcept
82 {
83  return faces_;
84 }
85 
86 
87 inline Foam::scalar Foam::fa::faceSetOption::timeStart(scalar val) noexcept
88 {
89  scalar old(timeStart_);
90  timeStart_ = val;
91  return old;
92 }
93 
94 
95 inline Foam::scalar Foam::fa::faceSetOption::duration(scalar val) noexcept
96 {
97  scalar old(duration_);
98  duration_ = val;
99  return old;
100 }
101 
102 
103 // ************************************************************************* //
Foam::fa::faceSetOption::faceSetName
const word & faceSetName() const noexcept
Definition: faceSetOptionI.H:69
Foam::fa::faceSetOption::duration
scalar duration() const noexcept
Return const access to the duration.
Definition: faceSetOptionI.H:36
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fa::faceSetOption::timeStart
scalar timeStart() const noexcept
Return const access to the time start.
Definition: faceSetOptionI.H:30
Foam::fa::faceSetOption::useSubMesh
bool useSubMesh() const noexcept
True if sub-selection should be used.
Definition: faceSetOptionI.H:63
Foam::fa::faceSetOption::faces
const labelList & faces() const noexcept
Return const access to the face selection.
Definition: faceSetOptionI.H:81
Foam::fa::faceSetOption::selectionModeType
selectionModeType
Enumeration for selection mode types.
Definition: faceSetOption.H:143
Foam::List< label >
Foam::fa::faceSetOption::timeStart_
scalar timeStart_
Time start.
Definition: faceSetOption.H:158
Foam::fa::faceSetOption::inTimeLimits
bool inTimeLimits(const scalar timeValue) const
Return true if within time limits.
Definition: faceSetOptionI.H:42
Foam::fa::faceSetOption::A
scalar A() const noexcept
Return const access to the total face area.
Definition: faceSetOptionI.H:75
Foam::fa::faceSetOption::selectionMode
selectionModeType selectionMode() const noexcept
Return const access to the face selection mode.
Definition: faceSetOptionI.H:57