displacementComponent_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::displacementComponent
26 
27 Description
28  Abstract base class for component displacement pointMesh movers
29 
30  The boundary displacement is set as a boundary condition
31  on the pointDisplacementX pointScalarField.
32 
33 SourceFiles
34  displacementComponent.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef displacementComponent_pointMeshMover_H
39 #define displacementComponent_pointMeshMover_H
40 
41 #include "pointMeshMover.H"
42 #include "pointFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace pointMeshMovers
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class displacementComponent Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public pointMeshMover
58 {
59 protected:
60 
61  // Protected data
62 
63  //- The component name to solve for
65 
66  //- The component to solve for
68 
69  //- Reference point field for this component
71 
72  //- Point motion field
74 
75 
76 private:
77 
78  // Private Member Functions
79 
80  //- Return the component corresponding to the given component name
81  direction cmpt(const word& cmptName) const;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("displacementComponent");
88 
89 
90  // Constructors
91 
92  //- Construct from polyMesh and dictionary and type
94  (
95  const polyMesh&,
96  const dictionary&,
97  const word& type
98  );
99 
100  //- Disallow default bitwise copy construction
102  (
103  const displacementComponent&
104  ) = delete;
105 
106 
107  //- Destructor
108  virtual ~displacementComponent();
109 
110 
111  // Member Functions
112 
113  //- Return reference to the reference field
115  {
116  return points0_;
117  }
118 
119  //- Return reference to the reference field
120  const scalarField& points0() const
121  {
122  return points0_;
123  }
124 
125  //- Update local data for geometry changes
126  virtual void movePoints(const pointField&);
127 
128  //- Update local data for topology changes
129  virtual void topoChange(const polyTopoChangeMap&);
130 
131  //- Update from another mesh using the given map
132  virtual void mapMesh(const polyMeshMap&);
133 
134  //- Update corresponding to the given distribution map
135  virtual void distribute(const polyDistributionMap&);
136 
137 
138  // Member Operators
139 
140  //- Disallow default bitwise assignment
141  void operator=(const displacementComponent&) = delete;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace pointMeshMovers
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
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 pointMesh movers.
Abstract base class for component displacement pointMesh movers.
scalarField points0_
Reference point field for this component.
TypeName("displacementComponent")
Runtime type information.
virtual void topoChange(const polyTopoChangeMap &)
Update local data for topology changes.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
scalarField & points0()
Return reference to the reference field.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
void operator=(const displacementComponent &)=delete
Disallow default bitwise assignment.
displacementComponent(const polyMesh &, const dictionary &, const word &type)
Construct from polyMesh and dictionary and type.
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 handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
uint8_t direction
Definition: direction.H:45
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488