zoneMotion.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-2022 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 Class
27  Foam::zoneMotion
28 
29 Description
30  Intermediate class for handling "zonified" motion.
31  Can select motion for the entire mesh, or restrict to a subset
32  of points based on a specified cellSet or cellZone(s).
33 
34 Usage
35  \verbatim
36  {
37  cellSet <name>;
38 
39  // and/or
40  cellZone <name or regex>;
41  }
42  \endverbatim
43 
44 Note
45  The cellZone can be specified as a wordRe and will select by name
46  or group. The special name "none" is treated as ignored.
47 
48 SourceFiles
49  zoneMotion.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef Foam_zoneMotion_H
54 #define Foam_zoneMotion_H
55 
56 #include "labelList.H"
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 
63 // Forward Declarations
64 class dictionary;
65 class polyMesh;
66 
67 /*---------------------------------------------------------------------------*\
68  Class zoneMotion Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 class zoneMotion
72 {
73  // Private Data
74 
75  //- Points to move when cell zones or sets are supplied
76  labelList pointIDs_;
77 
78  //- Flag to indicate whether all cells should move
79  bool moveAllCells_;
80 
81 
82 public:
83 
84  // Constructors
85 
86  //- Construct from dictionary
87  zoneMotion(const dictionary& dict, const polyMesh& mesh);
88 
89 
90  //- Destructor
91  virtual ~zoneMotion() = default;
92 
93 
94  // Member Functions
95 
96  //- The point ids (for cell set/zone subset)
97  const labelList& pointIDs() const noexcept
98  {
99  return pointIDs_;
100  }
101 
102  //- Move all cells?
103  bool moveAllCells() const noexcept
104  {
105  return moveAllCells_;
106  }
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
dictionary dict
zoneMotion(const dictionary &dict, const polyMesh &mesh)
Construct from dictionary.
Definition: zoneMotion.C:32
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual ~zoneMotion()=default
Destructor.
Intermediate class for handling "zonified" motion. Can select motion for the entire mesh...
Definition: zoneMotion.H:66
dynamicFvMesh & mesh
const direction noexcept
Definition: Scalar.H:258
bool moveAllCells() const noexcept
Move all cells?
Definition: zoneMotion.H:110
const labelList & pointIDs() const noexcept
The point ids (for cell set/zone subset)
Definition: zoneMotion.H:102
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Namespace for OpenFOAM.