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-------------------------------------------------------------------------------
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
26Class
27 Foam::zoneMotion
28
29Description
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
34Usage
35 \verbatim
36 {
37 cellSet <name>;
38
39 // and/or
40 cellZone <name or regex>;
41 }
42 \endverbatim
43
44Note
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
48SourceFiles
49 zoneMotion.C
50
51\*---------------------------------------------------------------------------*/
52
53#ifndef Foam_zoneMotion_H
54#define Foam_zoneMotion_H
55
56#include "labelList.H"
57
58// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59
60namespace Foam
61{
62
63// Forward Declarations
64class dictionary;
65class polyMesh;
66
67/*---------------------------------------------------------------------------*\
68 Class zoneMotion Declaration
69\*---------------------------------------------------------------------------*/
71class 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
82public:
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// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Intermediate class for handling "zonified" motion. Can select motion for the entire mesh,...
Definition: zoneMotion.H:71
const labelList & pointIDs() const noexcept
The point ids (for cell set/zone subset)
Definition: zoneMotion.H:96
bool moveAllCells() const noexcept
Move all cells?
Definition: zoneMotion.H:102
virtual ~zoneMotion()=default
Destructor.
dynamicFvMesh & mesh
Namespace for OpenFOAM.
const direction noexcept
Definition: Scalar.H:223
dictionary dict