dynamicMotionSolverListFvMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016 OpenFOAM Foundation
9  Copyright (C) 2020,2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::dynamicMotionSolverListFvMesh
29 
30 Description
31  Dynamic mesh able to handle multiple motion solvers.
32  NOTE: If the word entry "solvers" is not found it falls back to a single
33  motion solver behavior.
34 
35 SourceFiles
36  dynamicMotionSolverListFvMesh.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef dynamicMotionSolverListFvMesh_H
41 #define dynamicMotionSolverListFvMesh_H
42 
43 #include "dynamicFvMesh.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 class motionSolver;
51 
52 /*---------------------------------------------------------------------------*\
53  Class dynamicMotionSolverListFvMesh Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public dynamicFvMesh
59 {
60  // Private data
61 
62  PtrList<motionSolver> motionSolvers_;
63 
64 
65  // Private Member Functions
66 
67  //- No copy construct
69  (
71  ) = delete;
72 
73  //- No copy assignment
74  void operator=(const dynamicMotionSolverListFvMesh&) = delete;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("dynamicMotionSolverListFvMesh");
81 
82 
83  // Constructors
84 
85  //- Construct from IOobject
87  (
88  const IOobject& io,
89  const bool doInit=true
90  );
91 
92 
93  //- Destructor
95 
96 
97  // Member Functions
98 
99  //- Initialise all non-demand-driven data
100  virtual bool init(const bool doInit);
101 
102  //- Initialise all non-demand-driven data. Used for initialising
103  // without default motionSolver (used by dynamicRefineFvMesh)
104  virtual bool init(const bool doInit, const bool mandatory);
105 
106  //- Update the mesh for both mesh motion and topology change
107  virtual bool update();
108 
109  //- Map all fields in time using given map. Triggered by topo change
110  virtual void mapFields(const mapPolyMesh& mpm);
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
virtual bool update()
Update the mesh for both mesh motion and topology change.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:157
virtual void mapFields(const mapPolyMesh &mpm)
Map all fields in time using given map. Triggered by topo change.
TypeName("dynamicMotionSolverListFvMesh")
Runtime type information.
Dynamic mesh able to handle multiple motion solvers. NOTE: If the word entry "solvers" is not found i...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
Abstract base class for geometry and/or topology changing fvMesh.
Definition: dynamicFvMesh.H:74
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
Namespace for OpenFOAM.