simplifiedDynamicFvMesh.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) 2018 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::simplifiedDynamicFvMesh
28 
29 Description
30  Functions to generate simplified finite volume meshes
31 
32 SourceFiles
33  simplifiedDynamicFvMesh.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef simplifiedDynamicFvMesh_H
38 #define simplifiedDynamicFvMesh_H
39 
40 #include "columnFvMesh.H"
41 #include "runTimeSelectionTables.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class dynamicFvMesh;
49 
50 namespace simplifiedMeshes
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class simplifiedDynamicFvMesh Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 {
59 public:
60 
61  //- Runtime type information
62  TypeName("simplifiedDynamicFvMeshBase");
63 
64  // Declare run-time constructor selection table
65 
67  (
68  autoPtr,
70  time,
71  (
72  const Time& runTime,
73  const word& regionName
74  ),
76  );
77 
78 
79  // Selectors
80 
81  //- Return a reference to the selected simplified mesh
82  static autoPtr<dynamicFvMesh> New(const IOobject& io);
83 
84 
85  //- Constructor
87  {}
88 
89  //- Destructor
90  virtual ~simplifiedDynamicFvMeshBase() = default;
91 };
92 
93 
94 template<class DynamicMeshType>
96 :
98  public columnFvMeshInfo,
99  public DynamicMeshType
100 {
101 
102 public:
103 
104  ClassNameNoDebug(DynamicMeshType::typeName_.c_str());
105 
106  //- Constructor
108 
109  //- Update the mesh for both mesh motion and topology change
110  virtual bool update()
111  {
112  // No updates performed
113  return false;
114  }
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace simplifiedMeshes
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #ifdef NoRepository
127 #endif
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #define createProxyDynamicFvMesh(Type) \
132  \
133 typedef simplifiedMeshes::SimplifiedDynamicFvMesh<Type> simplified##Type; \
134  \
135 template<> \
136 const word simplified##Type::typeName(Type::typeName_()); \
137  \
138 namespace simplifiedMeshes \
139 { \
140  addToRunTimeSelectionTable \
141  ( \
142  simplifiedDynamicFvMeshBase, \
143  simplified##Type, \
144  time \
145  ); \
146 }
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::~simplifiedDynamicFvMeshBase
virtual ~simplifiedDynamicFvMeshBase()=default
Destructor.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::simplifiedMeshes::SimplifiedDynamicFvMesh::ClassNameNoDebug
ClassNameNoDebug(DynamicMeshType::typeName_.c_str())
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::simplifiedDynamicFvMeshBase
simplifiedDynamicFvMeshBase()
Constructor.
Definition: simplifiedDynamicFvMesh.H:85
Foam::dynamicFvMesh
Abstract base class for geometry and/or topology changing fvMesh.
Definition: dynamicFvMesh.H:78
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, dynamicFvMesh, time,(const Time &runTime, const word &regionName),(runTime, regionName))
columnFvMesh.H
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::TypeName
TypeName("simplifiedDynamicFvMeshBase")
Runtime type information.
simplifiedDynamicFvMeshTemplates.C
Foam::simplifiedMeshes::SimplifiedDynamicFvMesh::SimplifiedDynamicFvMesh
SimplifiedDynamicFvMesh(const Time &runTime, const word &regionName)
Constructor.
Definition: simplifiedDynamicFvMeshTemplates.C:33
Foam::simplifiedMeshes::SimplifiedDynamicFvMesh::update
virtual bool update()
Update the mesh for both mesh motion and topology change.
Definition: simplifiedDynamicFvMesh.H:109
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::simplifiedMeshes::SimplifiedDynamicFvMesh
Definition: simplifiedDynamicFvMesh.H:94
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase
Definition: simplifiedDynamicFvMesh.H:56
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::New
static autoPtr< dynamicFvMesh > New(const IOobject &io)
Return a reference to the selected simplified mesh.
Definition: simplifiedDynamicFvMesh.C:46
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::simplifiedMeshes::columnFvMeshInfo
Definition: columnFvMesh.H:53