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 -------------------------------------------------------------------------------
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::extrude2DMesh
28 
29 Description
30  Given a 2D mesh insert all the topology changes to extrude. Does not work
31  in parallel.
32 
33 SourceFiles
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 
50 namespace Foam
51 {
52 
53 // Forward declaration of classes
54 class polyMesh;
55 class polyTopoChange;
56 class mapPolyMesh;
57 class mapDistributePolyMesh;
58 class polyBoundaryMesh;
59 
60 /*---------------------------------------------------------------------------*\
61  Class extrude2DMesh Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class 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 
99 public:
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
131  void distribute(const mapDistributePolyMesh&)
132  {}
133 
134  label frontPatchi() const
135  {
136  return frontPatchi_;
137  }
138 
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
typeInfo.H
Foam::extrude2DMesh::addFrontBackPatches
void addFrontBackPatches()
Add front and back patches.
Foam::extrudeModel
Top level extrusion model class.
Definition: extrudeModel.H:76
Foam::extrude2DMesh::updateMesh
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
Definition: extrude2DMesh.H:126
Foam::polyTopoChange
Direct mesh changes based on v1.3 polyTopoChange syntax.
Definition: polyTopoChange.H:99
Foam::extrude2DMesh::distribute
void distribute(const mapDistributePolyMesh &)
Force recalculation of locally stored data for mesh distribution.
Definition: extrude2DMesh.H:130
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::extrude2DMesh::~extrude2DMesh
~extrude2DMesh()=default
Destructor.
Foam::extrude2DMesh::frontPatchi
label frontPatchi() const
Definition: extrude2DMesh.H:133
labelList.H
Foam::extrude2DMesh::ClassName
ClassName("extrude2DMesh")
Runtime type information.
extrudeModel.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
scalar.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
label.H
dictionary.H
Foam::extrude2DMesh::backPatchi
label backPatchi() const
Definition: extrude2DMesh.H:138
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::mapDistributePolyMesh
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Definition: mapDistributePolyMesh.H:66
Foam::extrude2DMesh
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
Definition: extrude2DMesh.H:63
Foam::extrude2DMesh::setRefinement
void setRefinement(polyTopoChange &)
Play commands into polyTopoChange to extrude mesh.