fvMotionSolver.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) 2012-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::fvMotionSolver
26 
27 Description
28  Base class for fvMesh motion solvers.
29 
30 SourceFiles
31  fvMotionSolver.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef fvMotionSolver_H
36 #define fvMotionSolver_H
37 
38 #include "fvMeshMover.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class fvMotionSolver Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class fvMotionSolver
50 :
51  public fvMeshMover
52 {
53 protected:
54 
55  // Protected Member Functions
56 
57  //- Create the corresponding patch types for cellMotion from those
58  // of the given pointMotion
59  template<class Type>
61  (
62  const typename PointField<Type>::
63  Boundary& pmUbf
64  ) const;
65 
66 
67 public:
68 
69  //- Runtime type information
70  ClassName("fvMotionSolver");
71 
72 
73  // Constructors
74 
75  //- Construct from fvMesh
77 
78  //- Construct from polyMesh
79  fvMotionSolver(const polyMesh&);
80 
81 
82  // Member Functions
83 
84  //- Is this motion solid body? Delegate to the motion solver.
85  virtual bool solidBodyMotion() const
86  {
87  return false;
88  }
89 
90  //- Return point location obtained from the current motion field
91  virtual tmp<pointField> newPoints() = 0;
92 
93  //- Update the mesh for both mesh motion and topology change
94  virtual bool update();
95 
96  // //- Update corresponding to the given map
97  // virtual void topoChange(const polyTopoChangeMap&);
98 
99  // //- Update from another mesh using the given map
100  // virtual void mapMesh(const polyMeshMap&);
101 
102  // //- Update corresponding to the given distribution map
103  virtual void distribute(const polyDistributionMap&)
104  {}
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #ifdef NoRepository
115  #include "fvMotionSolverTemplates.C"
116 #endif
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
Abstract base class for fvMesh movers.
Definition: fvMeshMover.H:53
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
Base class for fvMesh motion solvers.
virtual bool solidBodyMotion() const
Is this motion solid body? Delegate to the motion solver.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual bool update()
Update the mesh for both mesh motion and topology change.
ClassName("fvMotionSolver")
Runtime type information.
wordList cellMotionBoundaryTypes(const typename PointField< Type >::Boundary &pmUbf) const
Create the corresponding patch types for cellMotion from those.
virtual tmp< pointField > newPoints()=0
Return point location obtained from the current motion field.
fvMotionSolver(fvMesh &)
Construct from fvMesh.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.