displacement_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) 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::pointMeshMovers::displacement
26 
27 Description
28  Abstract base class for displacement pointMesh movers.
29 
30  The boundary displacement is set as a boundary condition
31  on the pointDisplacement pointVectorField.
32 
33 SourceFiles
34  displacement.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef displacement_pointMeshMover_H
39 #define displacement_pointMeshMover_H
40 
41 #include "displacementPoints0.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace pointMeshMovers
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class displacement Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class displacement
55 :
56  public displacementPoints0
57 {
58 protected:
59 
60  // Protected data
61 
62  //- Point motion field
64 
65  //- Return the points corresponding to the current displacement
66  tmp<pointField> points() const;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("displacement");
73 
74 
75  // Constructors
76 
77  //- Construct from mesh and dictionary
79  (
80  const polyMesh&,
81  const dictionary&,
82  const word& type
83  );
84 
85  //- Disallow default bitwise copy construction
86  displacement(const displacement&) = delete;
87 
88 
89  //- Destructor
90  virtual ~displacement();
91 
92 
93  // Member Functions
94 
95  //- Return reference to the point motion displacement field
97  {
98  return pointDisplacement_;
99  }
100 
101  //- Return const reference to the point motion displacement field
102  const pointVectorField& pointDisplacement() const
103  {
104  return pointDisplacement_;
105  }
106 
107  //- Return point location obtained from the current motion field
108  virtual tmp<pointField> newPoints() = 0;
109 
110  //- Update from another mesh using the given map (not implemented)
111  virtual void mapMesh(const polyMeshMap&);
112 
113 
114  // Member Operators
115 
116  //- Disallow default bitwise assignment
117  void operator=(const displacement&) = delete;
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace pointMeshMovers
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Abstract base class for displacement pointMesh movers.
TypeName("displacement")
Runtime type information.
void operator=(const displacement &)=delete
Disallow default bitwise assignment.
pointVectorField pointDisplacement_
Point motion field.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map (not implemented)
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
displacement(const polyMesh &, const dictionary &, const word &type)
Construct from mesh and dictionary.
virtual tmp< pointField > newPoints()=0
Return point location obtained from the current motion field.
tmp< pointField > points() const
Return the points corresponding to the current displacement.
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488