fvMeshTopoChangersMeshToMesh.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) 2022 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::fvMeshTopoChangers::meshToMesh
26 
27 Description
28  fvMeshTopoChanger which maps to new mesh
29 
30 SourceFiles
31  fvMeshTopoChangersMeshToMesh.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef fvMeshTopoChangersMeshToMesh_H
36 #define fvMeshTopoChangersMeshToMesh_H
37 
38 #include "fvMeshTopoChanger.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace fvMeshTopoChangers
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class fvMeshTopoChangers::meshToMesh Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class meshToMesh
52 :
53  public fvMeshTopoChanger
54 {
55  // Private Data
56 
57  //- Mesh-to-mesh control dictionary
58  dictionary dict_;
59 
60  //- Optional names of the patches which "cut" the internal mesh
61  // and hence cannot be mapped from existing patches
62  wordList cuttingPatches_;
63 
64  //- List of mesh mapping times
65  scalarList times_;
66 
67  //- Time delta used for time -> index
68  scalar timeDelta_;
69 
70  //- Hash set of mesh mapping time indices
71  labelHashSet timeIndices_;
72 
73  //- The time index used for updating
74  label timeIndex_;
75 
76 
77  // Private Member Functions
78 
79  //- Interpolate U's to Uf's
80  void interpolateUfs();
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("meshToMesh");
87 
88 
89  // Constructors
90 
91  //- Construct from fvMesh and dictionary
92  meshToMesh(fvMesh&, const dictionary& dict);
93 
94  //- Disallow default bitwise copy construction
95  meshToMesh(const meshToMesh&) = delete;
96 
97 
98  //- Destructor
99  virtual ~meshToMesh();
100 
101 
102  // Member Functions
104  const scalarList& times() const
105  {
106  return times_;
107  }
109  scalar timeDelta() const
110  {
111  return timeDelta_;
112  }
113 
114  //- Update the mesh for both mesh motion and topology change
115  virtual bool update();
116 
117  //- Update corresponding to the given map
118  virtual void topoChange(const polyTopoChangeMap&);
119 
120  //- Update from another mesh using the given map
121  virtual void mapMesh(const polyMeshMap&);
122 
123  //- Update corresponding to the given distribution map
124  virtual void distribute(const polyDistributionMap&);
125 
126 
127  // Member Operators
128 
129  //- Disallow default bitwise assignment
130  void operator=(const meshToMesh&) = delete;
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace fvMeshTopoChangers
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
dictionary dict
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual bool update()
Update the mesh for both mesh motion and topology change.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
meshToMesh(fvMesh &, const dictionary &dict)
Construct from fvMesh and dictionary.
void operator=(const meshToMesh &)=delete
Disallow default bitwise assignment.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
fvMeshTopoChanger which maps to new mesh
TypeName("meshToMesh")
Runtime type information.
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:50
Abstract base class for fvMesh movers.
Namespace for OpenFOAM.