multiSolidBody_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) 2011-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::multiSolidBody
26 
27 Description
28  Solid-body motion of the mesh parts specified by a run-time selectable
29  motion functions.
30 
31 SourceFiles
32  multiSolidBody_pointMeshMover.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef multiSolidBody_pointMeshMover_H
37 #define multiSolidBody_pointMeshMover_H
38 
39 #include "displacementPoints0.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace pointMeshMovers
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class multiSolidBody Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class multiSolidBody
54 :
55  public displacementPoints0
56 {
57  // Private Data
58 
59  //- The motion control function
61 
62  //- Specified cellZones
63  labelList zoneIndices_;
64 
65  //- Points to move per cellZone
66  labelListList zonePoints_;
67 
68  //- Cache the current transforms for topoChange
69  mutable List<septernion> transforms_;
70 
71 
72  // Private Member Functions
73 
74  //- Re-calculate the zone point indices from the cell-zones
75  void updateZonePointIndices();
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("multiSolidBody");
82 
83 
84  // Constructors
85 
86  //- Construct from mesh and dictionary
87  multiSolidBody(const polyMesh&, const dictionary&);
88 
89  //- Disallow default bitwise copy construction
90  multiSolidBody(const multiSolidBody&) = delete;
91 
92 
93  //- Destructor
95 
96 
97  // Member Functions
98 
99  //- Return point location obtained from the current motion field
100  virtual tmp<pointField> newPoints();
101 
102  //- This is a solid body motion
103  virtual bool solidBodyMotion() const
104  {
105  return true;
106  }
107 
108  //- Update local data for topology changes
109  virtual void topoChange(const polyTopoChangeMap&);
110 
111  //- Update corresponding to the given distribution map
112  virtual void distribute(const polyDistributionMap&);
113 
114  //- Update from another mesh using the given map
115  virtual void mapMesh(const polyMeshMap&);
116 
117 
118  // Member Operators
119 
120  //- Disallow default bitwise assignment
121  void operator=(const multiSolidBody&) = delete;
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace pointMeshMovers
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Solid-body motion of the mesh parts specified by a run-time selectable motion functions.
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 multiSolidBody &)=delete
Disallow default bitwise assignment.
TypeName("multiSolidBody")
Runtime type information.
multiSolidBody(const polyMesh &, const dictionary &)
Construct from mesh and dictionary.
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.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.