patchToPoly2DMesh.H
Go to the documentation of this file.
1 /*--------------------------------*- C++ -*----------------------------------*\
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::patchToPoly2DMesh
26 
27 Description
28  Convert a primitivePatch into a 2D polyMesh.
29 
30 SourceFiles
31  patchToPoly2DMesh.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef patchToPoly2DMesh_H
36 #define patchToPoly2DMesh_H
37 
38 #include "EdgeMap.H"
39 #include "MeshedSurface.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class patchToPoly2DMesh Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 {
52  // Private data
53 
54  // Reference to the meshed surface
56 
57  const wordList& patchNames_;
58 
59  const labelList& patchSizes_;
60 
62 
64 
66 
68 
70 
72 
73 
74  // Private Member Functions
75 
76  void flipFaceOrder();
77 
78  void createNeighbours();
79 
81 
82  void addPatchFacesToFaces();
83 
84  void addPatchFacesToOwner();
85 
87 
88  //- Disallow default bitwise copy construct
90 
91  //- Disallow default bitwise assignment
92  void operator=(const patchToPoly2DMesh&);
93 
94 
95 public:
96 
97  // Constructors
98 
99  //- Construct from a primitivePatch
101  (
102  const MeshedSurface<face>& patch,
103  const wordList& patchNames,
104  const labelList& patchSizes,
105  const EdgeMap<label>& mapEdgesRegion
106  );
107 
108 
109  //- Destructor
111 
112 
113  // Member Functions
114 
115  // Access
116 
117  pointField& points()
118  {
119  return points_;
120  }
121 
122  faceList& faces()
123  {
124  return faces_;
125  }
126 
127  labelList& owner()
128  {
129  return owner_;
130  }
131 
133  {
134  return neighbour_;
135  }
136 
137  const wordList& patchNames() const
138  {
139  return patchNames_;
140  }
141 
142  const labelList& patchSizes() const
143  {
144  return patchSizes_;
145  }
146 
147  const labelList& patchStarts() const
148  {
149  return patchStarts_;
150  }
151 
152 
153  // Edit
154 
155  //- Create the mesh
156  void createMesh();
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
Foam::patchToPoly2DMesh::patchNames
const wordList & patchNames() const
Definition: patchToPoly2DMesh.H:136
Foam::patchToPoly2DMesh::createMesh
void createMesh()
Create the mesh.
Foam::patchToPoly2DMesh::patchToPoly2DMesh
patchToPoly2DMesh(const patchToPoly2DMesh &)
Disallow default bitwise copy construct.
Foam::patchToPoly2DMesh::createPolyMeshComponents
void createPolyMeshComponents()
Foam::patchToPoly2DMesh::internalFaceOrder
labelList internalFaceOrder()
Foam::patchToPoly2DMesh::neighbour_
labelList neighbour_
Definition: patchToPoly2DMesh.H:70
Foam::patchToPoly2DMesh::operator=
void operator=(const patchToPoly2DMesh &)
Disallow default bitwise assignment.
Foam::patchToPoly2DMesh::patchSizes_
const labelList & patchSizes_
Definition: patchToPoly2DMesh.H:58
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::patchToPoly2DMesh::patchSizes
const labelList & patchSizes() const
Definition: patchToPoly2DMesh.H:141
Foam::patchToPoly2DMesh::neighbour
labelList & neighbour()
Definition: patchToPoly2DMesh.H:131
Foam::patchToPoly2DMesh::owner_
labelList owner_
Definition: patchToPoly2DMesh.H:68
Foam::patchToPoly2DMesh::flipFaceOrder
void flipFaceOrder()
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::patchToPoly2DMesh::faces_
faceList faces_
Definition: patchToPoly2DMesh.H:66
Foam::patchToPoly2DMesh::faces
faceList & faces()
Definition: patchToPoly2DMesh.H:121
Foam::patchToPoly2DMesh::patchStarts
const labelList & patchStarts() const
Definition: patchToPoly2DMesh.H:146
Foam::patchToPoly2DMesh::createNeighbours
void createNeighbours()
Foam::patchToPoly2DMesh::patch_
const MeshedSurface< face > & patch_
Definition: patchToPoly2DMesh.H:54
Foam::EdgeMap< label >
Foam::patchToPoly2DMesh::patchNames_
const wordList & patchNames_
Definition: patchToPoly2DMesh.H:56
Foam::patchToPoly2DMesh::points
pointField & points()
Definition: patchToPoly2DMesh.H:116
Foam::patchToPoly2DMesh
Convert a primitivePatch into a 2D polyMesh.
Definition: patchToPoly2DMesh.H:49
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::patchToPoly2DMesh::addPatchFacesToFaces
void addPatchFacesToFaces()
Foam::patchToPoly2DMesh::mapEdgesRegion_
const EdgeMap< label > & mapEdgesRegion_
Definition: patchToPoly2DMesh.H:62
EdgeMap.H
Foam::patchToPoly2DMesh::addPatchFacesToOwner
void addPatchFacesToOwner()
Foam::patchToPoly2DMesh::owner
labelList & owner()
Definition: patchToPoly2DMesh.H:126
Foam::MeshedSurface< face >
Foam::patchToPoly2DMesh::points_
pointField points_
Definition: patchToPoly2DMesh.H:64
MeshedSurface.H
Foam::patchToPoly2DMesh::~patchToPoly2DMesh
~patchToPoly2DMesh()
Destructor.
Foam::patchToPoly2DMesh::patchStarts_
labelList patchStarts_
Definition: patchToPoly2DMesh.H:60