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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::simplifiedDynamicFvMesh
28
29Description
30 Functions to generate simplified finite volume meshes
31
32SourceFiles
33 simplifiedDynamicFvMesh.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef simplifiedDynamicFvMesh_H
38#define simplifiedDynamicFvMesh_H
39
40#include "columnFvMesh.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48class dynamicFvMesh;
49
50namespace simplifiedMeshes
51{
52
53/*---------------------------------------------------------------------------*\
54 Class simplifiedDynamicFvMesh Declaration
55\*---------------------------------------------------------------------------*/
58{
59public:
60
61 //- Runtime type information
62 TypeName("simplifiedDynamicFvMeshBase");
63
64 // Declare run-time constructor selection table
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
83
84
85 //- Constructor
87 {}
88
89 //- Destructor
90 virtual ~simplifiedDynamicFvMeshBase() = default;
91};
92
93
94template<class DynamicMeshType>
96:
98 public columnFvMeshInfo,
99 public DynamicMeshType
100{
101
102public:
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// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131#define createProxyDynamicFvMesh(Type) \
132 \
133typedef simplifiedMeshes::SimplifiedDynamicFvMesh<Type> simplified##Type; \
134 \
135template<> \
136const word simplified##Type::typeName(Type::typeName_()); \
137 \
138namespace simplifiedMeshes \
139{ \
140 addToRunTimeSelectionTable \
141 ( \
142 simplifiedDynamicFvMeshBase, \
143 simplified##Type, \
144 time \
145 ); \
146}
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#endif
151
152// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Abstract base class for geometry and/or topology changing fvMesh.
Definition: dynamicFvMesh.H:81
virtual bool update()
Update the mesh for both mesh motion and topology change.
ClassNameNoDebug(DynamicMeshType::typeName_.c_str())
virtual ~simplifiedDynamicFvMeshBase()=default
Destructor.
TypeName("simplifiedDynamicFvMeshBase")
Runtime type information.
static autoPtr< dynamicFvMesh > New(const IOobject &io)
Return a reference to the selected simplified mesh.
declareRunTimeSelectionTable(autoPtr, dynamicFvMesh, time,(const Time &runTime, const word &regionName),(runTime, regionName))
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define ClassNameNoDebug(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:41
engineTime & runTime
Foam::word regionName(Foam::polyMesh::defaultRegion)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73