interpolator_fvMeshMover.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) 2021-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::fvMeshMovers::interpolator
26 
27 Description
28  Interpolates pre-specified motion specified as a set of pointVectorFields.
29 
30  The motion can be provided either as a set of displacement or position
31  fields and the entry \c displacement specified accordingly.
32 
33 Usage
34  Example:
35  \verbatim
36  mover interpolator;
37 
38  interpolator
39  {
40  field wantedDisplacement;
41  displacement yes;
42  interpolationScheme linear;
43  }
44  \endverbatim
45 
46  This will scan the case for \c wantedDisplacement \c pointVectorFields in
47  the time directories and interpolate those in time (using \c linear
48  interpolation) to obtain the current displacement. The advantage of
49  specifying displacement in this way is that it automatically works in
50  parallel using \c decomposePar to decompose the set of \c pointVectorFields
51  provided.
52 
53 SourceFiles
54  interpolator.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef interpolator_fvMeshMover_H
59 #define interpolator_fvMeshMover_H
60 
61 #include "fvMeshMover.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace fvMeshMovers
69 {
70 
71 /*---------------------------------------------------------------------------*\
72  Class interpolator Declaration
73 \*---------------------------------------------------------------------------*/
74 
75 class interpolator
76 :
77  public fvMeshMover
78 {
79  // Private Data
80 
81  pointMeshMovers::interpolator pointInterpolator_;
82 
83  const Switch displacement_;
84 
85  //- Starting points
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("interpolator");
93 
94 
95  // Constructors
96 
97  //- Construct from fvMesh and dictionary
99 
100  //- Disallow default bitwise copy construction
101  interpolator(const interpolator&) = delete;
102 
103 
104  //- Destructor
105  ~interpolator();
106 
107 
108  // Member Functions
109 
110  //- Update the mesh for both mesh motion and topology change
111  virtual bool update();
112 
113  //- Update corresponding to the given map
114  virtual void topoChange(const polyTopoChangeMap&);
115 
116  //- Update from another mesh using the given map
117  virtual void mapMesh(const polyMeshMap&);
118 
119  //- Update corresponding to the given distribution map
120  virtual void distribute(const polyDistributionMap&);
121 
122 
123  // Member Operators
124 
125  //- Disallow default bitwise assignment
126  void operator=(const interpolator&) = delete;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace fvMeshMovers
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
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
Abstract base class for fvMesh movers.
Definition: fvMeshMover.H:53
fvMesh & mesh()
Return the fvMesh.
Definition: fvMeshMover.H:102
Interpolates pre-specified motion specified as a set of pointVectorFields.
interpolator(fvMesh &mesh, const dictionary &dict)
Construct from fvMesh and dictionary.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
TypeName("interpolator")
Runtime type information.
virtual bool update()
Update the mesh for both mesh motion and topology change.
void operator=(const interpolator &)=delete
Disallow default bitwise assignment.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
Interpolates pointMesh point pointVectorFields.
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
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Namespace for OpenFOAM.
dictionary dict