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-2013 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 
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  {}
130 
131  label frontPatchI() const
132  {
133  return frontPatchI_;
134  }
135 
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
typeInfo.H
Foam::extrude2DMesh::addFrontBackPatches
void addFrontBackPatches()
Add front and back patches.
Foam::extrudeModel
Top level extrusion model class.
Definition: extrudeModel.H:51
Foam::extrude2DMesh::updateMesh
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
Definition: extrude2DMesh.H:123
Foam::extrude2DMesh::mesh_
polyMesh & mesh_
Reference to 2D mesh.
Definition: extrude2DMesh.H:66
Foam::extrude2DMesh::operator=
void operator=(const extrude2DMesh &)
Disallow default bitwise assignment.
Foam::polyTopoChange
Direct mesh changes based on v1.3 polyTopoChange syntax.
Definition: polyTopoChange.H:97
Foam::extrude2DMesh::distribute
void distribute(const mapDistributePolyMesh &)
Force recalculation of locally stored data for mesh distribution.
Definition: extrude2DMesh.H:127
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::extrude2DMesh::~extrude2DMesh
~extrude2DMesh()
Destructor.
Foam::extrude2DMesh::backPatchI
label backPatchI() const
Definition: extrude2DMesh.H:135
Foam::extrude2DMesh::model_
const extrudeModel & model_
Definition: extrude2DMesh.H:72
Foam::extrude2DMesh::modelType_
const word modelType_
Definition: extrude2DMesh.H:74
Foam::label
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
labelList.H
Foam::extrude2DMesh::ClassName
ClassName("extrude2DMesh")
Runtime type information.
Foam::extrude2DMesh::extrude2DMesh
extrude2DMesh(const extrude2DMesh &)
Find extrusion direction.
extrudeModel.H
Foam::extrude2DMesh::frontPatchI_
label frontPatchI_
Definition: extrude2DMesh.H:78
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
scalar.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::extrude2DMesh::backPatchI_
label backPatchI_
Definition: extrude2DMesh.H:79
Foam::extrude2DMesh::patchType_
const word patchType_
Definition: extrude2DMesh.H:76
Foam::extrude2DMesh::check2D
void check2D() const
Check the mesh is 2D.
Foam::extrude2DMesh::frontPatchI
label frontPatchI() const
Definition: extrude2DMesh.H:130
label.H
dictionary.H
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Foam::mapDistributePolyMesh
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Definition: mapDistributePolyMesh.H:57
Foam::extrude2DMesh
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
Definition: extrude2DMesh.H:61
Foam::extrude2DMesh::dict_
const dictionary dict_
Definition: extrude2DMesh.H:68
Foam::extrude2DMesh::setRefinement
void setRefinement(polyTopoChange &)
Play commands into polyTopoChange to extrude mesh.