solidBodyFvGeometryScheme.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) 2021-2022 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::solidBodyFvGeometryScheme
28
29Description
30 Geometry calculation scheme that performs geometry updates only in regions
31 where the mesh has changed.
32
33 Example usage in fvSchemes:
34
35 \verbatim
36 geometry
37 {
38 type solidBody;
39
40 // Optional entries
41
42 // If set to false, update the entire mesh
43 partialUpdate yes;
44
45 // Cache the motion addressing (changed points, faces, cells etc)
46 cacheMotion yes;
47 }
48 \endverbatim
49
50
51SourceFiles
52 solidBodyFvGeometryScheme.C
53
54\*---------------------------------------------------------------------------*/
55
56#ifndef solidBodyFvGeometryScheme_H
57#define solidBodyFvGeometryScheme_H
58
60
61// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62
63namespace Foam
64{
65
66/*---------------------------------------------------------------------------*\
67 Class solidBodyFvGeometryScheme Declaration
68\*---------------------------------------------------------------------------*/
71:
73{
74 // Private Data
75
76 //- Partial update flag
77 bool partialUpdate_;
78
79 //- Cache mesh motion flag
80 bool cacheMotion_;
81
82 //- Flag to indicate that the cache has been initialised
83 bool cacheInitialised_;
84
85 //- Changed face IDs
86 labelList changedFaceIDs_;
87
88 //- Changed patch IDs
89 labelList changedPatchIDs_;
90
91 //- Changed cell IDs
92 labelList changedCellIDs_;
93
94
95 // Private Member Functions
96
97 //- Set the mesh motion data (point, face IDs)
98 void setMeshMotionData();
99
100 //- No copy construct
102
103 //- No copy assignment
104 void operator=(const solidBodyFvGeometryScheme&) = delete;
105
106
107public:
108
109 //- Runtime type information
110 TypeName("solidBody");
111
112
113 // Constructors
114
115 //- Construct from mesh
117
118
119 //- Destructor
120 virtual ~solidBodyFvGeometryScheme() = default;
121
122
123 // Member Functions
124
125 //- Do what is necessary if the mesh has moved
126 virtual void movePoints();
127
128 //- Update mesh for topology changes
129 virtual void updateMesh(const mapPolyMesh& mpm);
130};
131
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135} // End namespace Foam
136
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139#endif
140
141// ************************************************************************* //
Default geometry calculation scheme. Slight stabilisation for bad meshes.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const fvMesh & mesh() const
Return mesh reference.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Geometry calculation scheme that performs geometry updates only in regions where the mesh has changed...
virtual ~solidBodyFvGeometryScheme()=default
Destructor.
virtual void movePoints()
Do what is necessary if the mesh has moved.
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh for topology changes.
TypeName("solidBody")
Runtime type information.
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73