Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
dynamicMesh
polyTopoChange
polyTopoChange
faceCollapser.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) 1991-2010 OpenCFD Ltd.
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::faceCollapser
26
27
Description
28
Collapses faces into edges. Used to remove sliver faces (faces with small
29
area but non-zero span).
30
31
Passed in as
32
- face label
33
- the two indices in the face (fpA, fpB) which delimit the vertices to be
34
kept.
35
36
Takes the vertices outside the range fpA..fpB and projects them onto the
37
kept edges (edges using kept vertices only).
38
39
Note:
40
- Use in combination with edge collapse to cleanup meshes.
41
- Can not remove cells so will mess up trying to remove a face on a tet.
42
- WIP. Should be combined with edge collapsing and cell collapsing into
43
proper 'collapser'.
44
- Caller is responsible for making sure kept vertices (fpA..fpB) for one
45
face are not the vertices to be removed for another face.
46
47
SourceFiles
48
faceCollapser.C
49
50
\*---------------------------------------------------------------------------*/
51
52
#ifndef faceCollapser_H
53
#define faceCollapser_H
54
55
#include <
OpenFOAM/labelList.H
>
56
#include <
OpenFOAM/point.H
>
57
#include <
OpenFOAM/Map.H
>
58
#include <
OpenFOAM/HashSet.H
>
59
#include <
OpenFOAM/typeInfo.H
>
60
#include <
OpenFOAM/edgeList.H
>
61
62
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63
64
namespace
Foam
65
{
66
67
// Forward declaration of classes
68
class
polyMesh;
69
class
polyTopoChange;
70
class
mapPolyMesh;
71
72
/*---------------------------------------------------------------------------*\
73
Class faceCollapser Declaration
74
\*---------------------------------------------------------------------------*/
75
76
class
faceCollapser
77
{
78
// Private data
79
80
//- Reference to mesh
81
const
polyMesh
& mesh_;
82
83
84
// Static Functions
85
86
//- Insert labelList into labelHashSet. Optional excluded element.
87
static
void
insert
88
(
89
const
labelList
& elems,
90
const
label excludeElem,
91
labelHashSet
&
set
92
);
93
94
//- Find edge amongst candidate edges.
95
static
label findEdge
96
(
97
const
edgeList
& edges,
98
const
labelList
& edgeLabels,
99
const
label v0,
100
const
label
v1
101
);
102
103
104
// Private Member Functions
105
106
//- Replace vertices in face
107
void
filterFace
108
(
109
const
Map<labelList>
& splitEdges,
110
const
label faceI,
111
polyTopoChange
& meshMod
112
)
const
;
113
114
115
//- Disallow default bitwise copy construct
116
faceCollapser
(
const
faceCollapser
&);
117
118
//- Disallow default bitwise assignment
119
void
operator=(
const
faceCollapser
&);
120
121
122
public
:
123
124
//- Runtime type information
125
ClassName
(
"faceCollapser"
);
126
127
128
// Constructors
129
130
//- Construct from mesh.
131
faceCollapser
(
const
polyMesh
&
mesh
);
132
133
134
// Member Functions
135
136
// Edit
137
138
//- Collapse faces along endpoints. Play commands into
139
// polyTopoChange to create mesh.
140
void
setRefinement
141
(
142
const
labelList
& faceLabels,
143
const
labelList
& fpA,
144
const
labelList
& fpB,
145
polyTopoChange
&
146
)
const
;
147
148
//- Update stored quantities for new mesh labels.
149
void
updateMesh
(
const
mapPolyMesh
&)
150
{}
151
};
152
153
154
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156
}
// End namespace Foam
157
158
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160
#endif
161
162
// ************************ vim: set sw=4 sts=4 et: ************************ //