extrude2DMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::extrude2DMesh
26 
27 Description
28  Given a 2D mesh insert all the topology changes to extrude. Does not work
29  in parallel.
30 
31 SourceFiles
32  extrude2DMesh.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef extrude2DMesh_H
37 #define extrude2DMesh_H
38 
39 #include "typeInfo.H"
40 #include "label.H"
41 #include "scalar.H"
42 #include "labelList.H"
43 #include "dictionary.H"
44 #include "extrudeModel.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward declaration of classes
52 class polyMesh;
53 class polyTopoChange;
54 class mapPolyMesh;
55 class mapDistributePolyMesh;
56 class polyBoundaryMesh;
57 
58 /*---------------------------------------------------------------------------*\
59  Class extrude2DMesh Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class extrude2DMesh
63 {
64  // Private Data
65 
66  //- Reference to 2D mesh
67  polyMesh& mesh_;
68 
69  const dictionary dict_;
70 
71  // const dictionary patchDict_;
72 
73  const extrudeModel& model_;
74 
75  const word modelType_;
76 
77  const word patchType_;
78 
79  label frontPatchi_;
80  label backPatchi_;
81 
82  // Private Member Functions
83 
84  //- Check the mesh is 2D
85  void check2D() const;
86 
87  //- Find extrusion direction
88  // void findExtrudeDirection();
89 
90 
91 public:
92 
93  //- Runtime type information
94  ClassName("extrude2DMesh");
95 
96 
97  // Constructors
99  (
100  polyMesh&,
101  const dictionary& dict,
102  const extrudeModel& model
103  );
104 
105  //- Disallow default bitwise copy construction
106  extrude2DMesh(const extrude2DMesh&) = delete;
107 
108 
109  //- Destructor
110  ~extrude2DMesh();
111 
112 
113  // Member Functions
114 
115  //- Add front and back patches
116  void addFrontBackPatches();
117 
118  //- Play commands into polyTopoChange to extrude mesh.
120 
121  //- Force recalculation of locally stored data on topological change
122  void updateMesh(const mapPolyMesh&)
123  {}
124 
125  //- Force recalculation of locally stored data for mesh distribution
126  void distribute(const mapDistributePolyMesh&)
127  {}
129  label frontPatchi() const
130  {
131  return frontPatchi_;
132  }
134  label backPatchi() const
135  {
136  return backPatchi_;
137  }
138 
139 
140  // Member Operators
141 
142  //- Disallow default bitwise assignment
143  void operator=(const extrude2DMesh&) = delete;
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
ClassName("extrude2DMesh")
Find extrusion direction.
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
label frontPatchi() const
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
void addFrontBackPatches()
Add front and back patches.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Top level extrusion model class.
Definition: extrudeModel.H:51
label backPatchi() const
~extrude2DMesh()
Destructor.
A class for handling words, derived from string.
Definition: word.H:59
void operator=(const extrude2DMesh &)=delete
Disallow default bitwise assignment.
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
Definition: extrude2DMesh.H:61
Direct mesh changes based on v1.3 polyTopoChange syntax.
extrude2DMesh(polyMesh &, const dictionary &dict, const extrudeModel &model)
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
void setRefinement(polyTopoChange &)
Play commands into polyTopoChange to extrude mesh.
void distribute(const mapDistributePolyMesh &)
Force recalculation of locally stored data for mesh distribution.
Namespace for OpenFOAM.
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.