extrude2DMesh.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) 2011-2016 OpenFOAM Foundation
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::extrude2DMesh
28
29Description
30 Given a 2D mesh insert all the topology changes to extrude. Does not work
31 in parallel.
32
33SourceFiles
34 extrude2DMesh.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef extrude2DMesh_H
39#define extrude2DMesh_H
40
41#include "typeInfo.H"
42#include "label.H"
43#include "scalar.H"
44#include "labelList.H"
45#include "dictionary.H"
46#include "extrudeModel.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53// Forward declaration of classes
54class polyMesh;
55class polyTopoChange;
56class mapPolyMesh;
57class mapDistributePolyMesh;
58class polyBoundaryMesh;
59
60/*---------------------------------------------------------------------------*\
61 Class extrude2DMesh Declaration
62\*---------------------------------------------------------------------------*/
64class extrude2DMesh
65{
66 // Private data
67
68 //- Reference to 2D mesh
69 polyMesh& mesh_;
70
71 const dictionary dict_;
72
73 //const dictionary patchDict_;
74
75 const extrudeModel& model_;
76
77 const word modelType_;
78
79 const word patchType_;
80
81 label frontPatchi_;
82
83 label backPatchi_;
84
85 // Private Member Functions
86
87 //- Check the mesh is 2D
88 void check2D() const;
89
90 //- Find extrusion direction
91 //void findExtrudeDirection();
92
93 //- No copy construct
94 extrude2DMesh(const extrude2DMesh&) = delete;
95
96 //- No copy assignment
97 void operator=(const extrude2DMesh&) = delete;
98
99public:
100
101 //- Runtime type information
102 ClassName("extrude2DMesh");
103
104
105 // Constructors
107 (
108 polyMesh&,
109 const dictionary& dict,
110 const extrudeModel& model
111 );
112
113
114 //- Destructor
115 ~extrude2DMesh() = default;
116
117
118 // Member Functions
119
120 //- Add front and back patches
121 void addFrontBackPatches();
122
123 //- Play commands into polyTopoChange to extrude mesh.
125
126 //- Force recalculation of locally stored data on topological change
127 void updateMesh(const mapPolyMesh&)
128 {}
129
130 //- Force recalculation of locally stored data for mesh distribution
132 {}
134 label frontPatchi() const
135 {
136 return frontPatchi_;
137 }
139 label backPatchi() const
140 {
141 return backPatchi_;
142 }
143
144};
145
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149} // End namespace Foam
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153#endif
154
155// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
Definition: extrude2DMesh.H:64
extrude2DMesh(polyMesh &, const dictionary &dict, const extrudeModel &model)
~extrude2DMesh()=default
Destructor.
void distribute(const mapDistributePolyMesh &)
Force recalculation of locally stored data for mesh distribution.
label frontPatchi() const
ClassName("extrude2DMesh")
Runtime type information.
label backPatchi() const
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
void setRefinement(polyTopoChange &)
Play commands into polyTopoChange to extrude mesh.
void addFrontBackPatches()
Add front and back patches.
Top level extrusion model class.
Definition: extrudeModel.H:77
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Direct mesh changes based on v1.3 polyTopoChange syntax.
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
Namespace for OpenFOAM.
dictionary dict