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 | Copyright (C) 2011-2016 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  //- Disallow default bitwise copy construct
92 
93  //- Disallow default bitwise assignment
94  void operator=(const extrude2DMesh&);
95 
96 public:
97 
98  //- Runtime type information
99  ClassName("extrude2DMesh");
100 
101 
102  // Constructors
104  (
105  polyMesh&,
106  const dictionary& dict,
107  const extrudeModel& model
108  );
109 
110 
111  //- Destructor
112  ~extrude2DMesh();
113 
114 
115  // Member Functions
116 
117  //- Add front and back patches
118  void addFrontBackPatches();
119 
120  //- Play commands into polyTopoChange to extrude mesh.
122 
123  //- Force recalculation of locally stored data on topological change
124  void updateMesh(const mapPolyMesh&)
125  {}
126 
127  //- Force recalculation of locally stored data for mesh distribution
128  void distribute(const mapDistributePolyMesh&)
129  {}
131  label frontPatchi() const
132  {
133  return frontPatchi_;
134  }
136  label backPatchi() const
137  {
138  return backPatchi_;
139  }
140 
141 };
142 
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
ClassName("extrude2DMesh")
Runtime type information.
dictionary dict
label backPatchi() const
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:137
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
~extrude2DMesh()
Destructor.
label frontPatchi() const
A class for handling words, derived from string.
Definition: word.H:59
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.
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.