dynamicFvMesh.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) 2011-2018 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::dynamicFvMesh
26 
27 Description
28  Abstract base class for geometry and/or topology changing fvMesh.
29 
30 SourceFiles
31  dynamicFvMesh.C
32  dynamicFvMeshNew.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef dynamicFvMesh_H
37 #define dynamicFvMesh_H
38 
39 #include "fvMesh.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class dynamicFvMesh Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class dynamicFvMesh
51 :
52  public fvMesh
53 {
54  // Private Member Functions
55 
56  //- Disallow default bitwise copy construct
58 
59  //- Disallow default bitwise assignment
60  void operator=(const dynamicFvMesh&);
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("dynamicFvMesh");
67 
68 
69  // Declare run-time constructor selection table
70 
72  (
73  autoPtr,
75  IOobject,
76  (const IOobject& io),
77  (io)
78  );
79 
80 
81  // Constructors
82 
83  //- Construct from objectRegistry, and read/write options
84  explicit dynamicFvMesh(const IOobject& io);
85 
86  //- Construct from components without boundary.
87  // Boundary is added using addFvPatches() member function
89  (
90  const IOobject& io,
91  const Xfer<pointField>& points,
92  const Xfer<faceList>& faces,
93  const Xfer<labelList>& allOwner,
94  const Xfer<labelList>& allNeighbour,
95  const bool syncPar = true
96  );
97 
98  //- Construct without boundary from cells rather than owner/neighbour.
99  // Boundary is added using addPatches() member function
101  (
102  const IOobject& io,
103  const Xfer<pointField>& points,
104  const Xfer<faceList>& faces,
105  const Xfer<cellList>& cells,
106  const bool syncPar = true
107  );
108 
109 
110  // Selectors
111 
112  //- Select, construct and return the dynamicFvMesh
113  // If the constant/dynamicMeshDict does not exist
114  // a staticFvMesh is returned
115  static autoPtr<dynamicFvMesh> New(const IOobject& io);
116 
117 
118  //- Destructor
119  virtual ~dynamicFvMesh();
120 
121 
122  // Member Functions
123 
124  //- Is mesh dynamic
125  virtual bool dynamic() const
126  {
127  return true;
128  }
129 
130  //- Update the mesh for both mesh motion and topology change
131  virtual bool update() = 0;
132 };
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
A simple container for copying or transferring objects of type <T>.
Definition: Xfer.H:85
virtual bool dynamic() const
Is mesh dynamic.
const cellList & cells() const
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1003
virtual ~dynamicFvMesh()
Destructor.
Definition: dynamicFvMesh.C:90
TypeName("dynamicFvMesh")
Runtime type information.
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1028
virtual bool update()=0
Update the mesh for both mesh motion and topology change.
Abstract base class for geometry and/or topology changing fvMesh.
Definition: dynamicFvMesh.H:49
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
static autoPtr< dynamicFvMesh > New(const IOobject &io)
Select, construct and return the dynamicFvMesh.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
declareRunTimeSelectionTable(autoPtr, dynamicFvMesh, IOobject,(const IOobject &io),(io))
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.