1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Collapses faces into edges. Used to remove sliver faces (faces with small
30 area but non-zero span).
34 - the two indices in the face (fpA, fpB) which delimit the vertices to be
37 Takes the vertices outside the range fpA..fpB and projects them onto the
38 kept edges (edges using kept vertices only).
41 - Use in combination with edge collapse to cleanup meshes.
42 - Can not remove cells so will mess up trying to remove a face on a tet.
43 - WIP. Should be combined with edge collapsing and cell collapsing into
45 - Caller is responsible for making sure kept vertices (fpA..fpB) for one
46 face are not the vertices to be removed for another face.
51 \*---------------------------------------------------------------------------*/
53 #ifndef faceCollapser_H
54 #define faceCollapser_H
56 #include "labelList.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 // Forward declaration of classes
73 /*---------------------------------------------------------------------------*\
74 Class faceCollapser Declaration
75 \*---------------------------------------------------------------------------*/
82 const polyMesh& mesh_;
87 //- Insert labelList into labelHashSet. Optional excluded element.
90 const labelList& elems,
91 const label excludeElem,
95 //- Find edge amongst candidate edges.
98 const edgeList& edges,
99 const labelList& edgeLabels,
105 // Private Member Functions
107 //- Replace vertices in face
110 const Map<labelList>& splitEdges,
112 polyTopoChange& meshMod
116 //- Disallow default bitwise copy construct
117 faceCollapser(const faceCollapser&);
119 //- Disallow default bitwise assignment
120 void operator=(const faceCollapser&);
125 //- Runtime type information
126 ClassName("faceCollapser");
131 //- Construct from mesh.
132 faceCollapser(const polyMesh& mesh);
139 //- Collapse faces along endpoints. Play commands into
140 // polyTopoChange to create mesh.
143 const labelList& faceLabels,
144 const labelList& fpA,
145 const labelList& fpB,
149 //- Update stored quantities for new mesh labels.
150 void updateMesh(const mapPolyMesh&)
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 } // End namespace Foam
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 // ************************************************************************* //