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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
27 
28 inline Foam::scalar Foam::fv::cellSetOption::timeStart() const
29 {
30  return timeStart_;
31 }
32 
33 
34 inline Foam::scalar Foam::fv::cellSetOption::duration() const
35 {
36  return duration_;
37 }
38 
39 
40 inline bool Foam::fv::cellSetOption::inTimeLimits(const scalar time) const
41 {
42  return
43  (
44  (timeStart_ < 0)
45  ||
46  (
47  (mesh_.time().value() >= timeStart_)
48  && (mesh_.time().value() <= (timeStart_ + duration_))
49  )
50  );
51 }
52 
53 
56 {
57  return selectionMode_;
58 }
59 
60 
62 {
63  return cellSetName_;
64 }
65 
66 
67 inline Foam::scalar Foam::fv::cellSetOption::V() const
68 {
69  return V_;
70 }
71 
72 
74 {
75  return cells_;
76 }
77 
78 
79 inline Foam::scalar& Foam::fv::cellSetOption::timeStart()
80 {
81  return timeStart_;
82 }
83 
84 
85 inline Foam::scalar& Foam::fv::cellSetOption::duration()
86 {
87  return duration_;
88 }
89 
90 
91 // ************************************************************************* //
selectionModeType selectionMode_
Cell selection mode.
scalar V_
Sum of cell volumes.
const fvMesh & mesh_
Reference to the mesh database.
Definition: fvOption.H:79
const labelList & cells() const
Return const access to the cell set.
scalar timeStart() const
Return const access to the time start.
scalar duration_
Duration.
Definition: cellSetOption.H:99
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:243
scalar V() const
Return const access to the total cell volume.
selectionModeType
Enumeration for selection mode types.
Definition: cellSetOption.H:78
A class for handling words, derived from string.
Definition: word.H:59
scalar duration() const
Return const access to the duration.
const Type & value() const
Return const reference to value.
const word & cellSetName() const
Return const access to the name of cell set for "cellSet".
labelList cells_
Set of cells to apply source to.
word cellSetName_
Name of cell set for "cellSet" and "cellZone" selectionMode.
bool inTimeLimits(const scalar time) const
Return true if within time limits.
scalar timeStart_
Time start.
Definition: cellSetOption.H:96
const selectionModeType & selectionMode() const
Return const access to the cell selection mode.