OpenFOAM
12
The OpenFOAM Foundation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
patchToPoly2DMesh.H
Go to the documentation of this file.
1
/*--------------------------------*- C++ -*----------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2020 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
50
class
patchToPoly2DMesh
51
{
52
// Private Data
53
54
// Reference to the meshed surface
55
const
MeshedSurface<face>
& patch_;
56
57
const
wordList
& patchNames_;
58
59
const
labelList
& patchSizes_;
60
61
labelList
patchStarts_;
62
63
const
EdgeMap<label>
& mapEdgesRegion_;
64
65
pointField
points_;
66
67
faceList
faces_;
68
69
labelList
owner_;
70
71
labelList
neighbour_;
72
73
74
// Private Member Functions
75
76
void
flipFaceOrder();
77
78
void
createNeighbours();
79
80
labelList
internalFaceOrder();
81
82
void
addPatchFacesToFaces();
83
84
void
addPatchFacesToOwner();
85
86
void
createPolyMeshComponents();
87
88
89
public
:
90
91
// Constructors
92
93
//- Construct from a primitivePatch
94
patchToPoly2DMesh
95
(
96
const
MeshedSurface<face>
& patch,
97
const
wordList
&
patchNames
,
98
const
labelList
&
patchSizes
,
99
const
EdgeMap<label>
& mapEdgesRegion
100
);
101
102
//- Disallow default bitwise copy construction
103
patchToPoly2DMesh
(
const
patchToPoly2DMesh
&) =
delete
;
104
105
106
//- Destructor
107
~patchToPoly2DMesh
();
108
109
110
// Member Functions
111
112
// Access
113
114
pointField
&
points
()
115
{
116
return
points_;
117
}
118
119
faceList
&
faces
()
120
{
121
return
faces_;
122
}
123
124
labelList
&
owner
()
125
{
126
return
owner_;
127
}
128
129
labelList
&
neighbour
()
130
{
131
return
neighbour_;
132
}
133
134
const
wordList
&
patchNames
()
const
135
{
136
return
patchNames_;
137
}
138
139
const
labelList
&
patchSizes
()
const
140
{
141
return
patchSizes_;
142
}
143
144
const
labelList
&
patchStarts
()
const
145
{
146
return
patchStarts_;
147
}
148
149
150
// Edit
151
152
//- Create the mesh
153
void
createMesh
();
154
155
156
// Member Operators
157
158
//- Disallow default bitwise assignment
159
void
operator=
(
const
patchToPoly2DMesh
&) =
delete
;
160
};
161
162
163
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165
}
// End namespace Foam
166
167
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168
169
#endif
170
171
// ************************************************************************* //
EdgeMap.H
MeshedSurface.H
Foam::EdgeMap< label >
Foam::Field< vector >
Foam::List< word >
Foam::MeshedSurface< face >
Foam::patchToPoly2DMesh
Convert a primitivePatch into a 2D polyMesh.
Definition:
patchToPoly2DMesh.H:50
Foam::patchToPoly2DMesh::patchStarts
const labelList & patchStarts() const
Definition:
patchToPoly2DMesh.H:143
Foam::patchToPoly2DMesh::points
pointField & points()
Definition:
patchToPoly2DMesh.H:113
Foam::patchToPoly2DMesh::createMesh
void createMesh()
Create the mesh.
Foam::patchToPoly2DMesh::patchNames
const wordList & patchNames() const
Definition:
patchToPoly2DMesh.H:133
Foam::patchToPoly2DMesh::faces
faceList & faces()
Definition:
patchToPoly2DMesh.H:118
Foam::patchToPoly2DMesh::operator=
void operator=(const patchToPoly2DMesh &)=delete
Disallow default bitwise assignment.
Foam::patchToPoly2DMesh::neighbour
labelList & neighbour()
Definition:
patchToPoly2DMesh.H:128
Foam::patchToPoly2DMesh::patchSizes
const labelList & patchSizes() const
Definition:
patchToPoly2DMesh.H:138
Foam::patchToPoly2DMesh::~patchToPoly2DMesh
~patchToPoly2DMesh()
Destructor.
Foam::patchToPoly2DMesh::owner
labelList & owner()
Definition:
patchToPoly2DMesh.H:123
Foam::patchToPoly2DMesh::patchToPoly2DMesh
patchToPoly2DMesh(const MeshedSurface< face > &patch, const wordList &patchNames, const labelList &patchSizes, const EdgeMap< label > &mapEdgesRegion)
Construct from a primitivePatch.
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:214
applications
utilities
mesh
generation
extrude2DMesh
extrude2DMesh
patchToPoly2DMesh
patchToPoly2DMesh.H
Generated by
1.9.1