OpenFOAM
v2312
The open source CFD toolbox
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
57
class
simplifiedDynamicFvMeshBase
58
{
59
public
:
60
61
//- Runtime type information
62
TypeName
(
"simplifiedDynamicFvMeshBase"
);
63
64
// Declare run-time constructor selection table
65
66
declareRunTimeSelectionTable
67
(
68
autoPtr
,
69
dynamicFvMesh
,
70
time,
71
(
72
const
Time
&
runTime
,
73
const
word
&
regionName
74
),
75
(
runTime
,
regionName
)
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
86
simplifiedDynamicFvMeshBase
()
87
{}
88
89
//- Destructor
90
virtual
~simplifiedDynamicFvMeshBase
() =
default
;
91
};
92
93
94
template
<
class
DynamicMeshType>
95
class
SimplifiedDynamicFvMesh
96
:
97
public
simplifiedDynamicFvMeshBase,
98
public
columnFvMeshInfo
,
99
public
DynamicMeshType
100
{
101
102
public
:
103
104
ClassNameNoDebug
(DynamicMeshType::typeName_.c_str());
105
106
//- Constructor
107
SimplifiedDynamicFvMesh
(
const
Time
&
runTime
,
const
word
&
regionName
);
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
126
#include "
simplifiedDynamicFvMeshTemplates.C
"
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
// ************************************************************************* //
columnFvMesh.H
runTime
engineTime & runTime
Definition:
createEngineTime.H:13
Foam::simplifiedMeshes::SimplifiedDynamicFvMesh::ClassNameNoDebug
ClassNameNoDebug(DynamicMeshType::typeName_.c_str())
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, dynamicFvMesh, time,(const Time &runTime, const word ®ionName),(runTime, regionName))
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition:
Time.H:69
simplifiedDynamicFvMeshTemplates.C
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::simplifiedDynamicFvMeshBase
simplifiedDynamicFvMeshBase()
Constructor.
Definition:
simplifiedDynamicFvMesh.H:87
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase
Definition:
simplifiedDynamicFvMesh.H:52
Foam::simplifiedMeshes::columnFvMeshInfo
Definition:
columnFvMesh.H:49
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:63
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::~simplifiedDynamicFvMeshBase
virtual ~simplifiedDynamicFvMeshBase()=default
Destructor.
regionName
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
Foam::dynamicFvMesh
Abstract base class for geometry and/or topology changing fvMesh.
Definition:
dynamicFvMesh.H:74
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::TypeName
TypeName("simplifiedDynamicFvMeshBase")
Runtime type information.
Foam::simplifiedMeshes::SimplifiedDynamicFvMesh::update
virtual bool update()
Update the mesh for both mesh motion and topology change.
Definition:
simplifiedDynamicFvMesh.H:117
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition:
HashPtrTable.H:48
Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::New
static autoPtr< dynamicFvMesh > New(const IOobject &io)
Return a reference to the selected simplified mesh.
Definition:
simplifiedDynamicFvMesh.C:39
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
io
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Foam::simplifiedMeshes::SimplifiedDynamicFvMesh::SimplifiedDynamicFvMesh
SimplifiedDynamicFvMesh(const Time &runTime, const word ®ionName)
Constructor.
Definition:
simplifiedDynamicFvMeshTemplates.C:26
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition:
IOobject.H:172
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
src
dynamicFvMesh
simplifiedDynamicFvMesh
simplifiedDynamicFvMesh.H
Generated by
1.8.14