solidBody_pointMeshMover.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2026 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 Class
25  Foam::pointMeshMovers::solidBody
26 
27 Description
28  Solid-body motion of the mesh specified by a run-time selectable
29  motion function.
30 
31 SourceFiles
32  solidBody_pointMeshMover.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef solidBody_pointMeshMover_H
37 #define solidBody_pointMeshMover_H
38 
39 #include "displacementPoints0.H"
41 #include "generatedCellZone.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace pointMeshMovers
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class solidBody Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class solidBody
55 :
56  public displacementPoints0
57 {
58  // Private Data
59 
60  //- The motion control function
62 
63  //- The name of the cellZone to restrict motion to
64  generatedCellZone zone_;
65 
66  //- Points to move when cell zone is supplied
67  labelList zonePoints_;
68 
69  //- Cache the current transform for topoChange
70  mutable septernion transform_;
71 
72 
73  // Private Member Functions
74 
75  //- Re-calculate the zone point indices from the cell-zone
76  void updateZonePointIndices();
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("solidBody");
83 
84 
85  // Constructors
86 
87  //- Construct from mesh and dictionary
88  solidBody(const polyMesh&, const dictionary&);
89 
90  //- Disallow default bitwise copy construction
91  solidBody(const solidBody&) = delete;
92 
93 
94  //- Destructor
95  ~solidBody();
96 
97 
98  // Member Functions
99 
100  //- Return point location obtained from the current motion field
101  virtual tmp<pointField> newPoints();
102 
103  //- This is a solid body motion
104  virtual bool solidBodyMotion() const
105  {
106  return true;
107  }
108 
109  //- Update local data for topology changes
110  virtual void topoChange(const polyTopoChangeMap&);
111 
112  //- Update corresponding to the given distribution map
113  virtual void distribute(const polyDistributionMap&);
114 
115  //- Update from another mesh using the given map
116  virtual void mapMesh(const polyMeshMap&);
117 
118 
119  // Member Operators
120 
121  //- Disallow default bitwise assignment
122  void operator=(const solidBody&) = delete;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace pointMeshMovers
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
cellZone selection or generation class
Solid-body motion of the mesh specified by a run-time selectable motion function.
solidBody(const polyMesh &, const dictionary &)
Construct from mesh and dictionary.
virtual bool solidBodyMotion() const
This is a solid body motion.
virtual void topoChange(const polyTopoChangeMap &)
Update local data for topology changes.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual tmp< pointField > newPoints()
Return point location obtained from the current motion field.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void operator=(const solidBody &)=delete
Disallow default bitwise assignment.
TypeName("solidBody")
Runtime type information.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:66
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.