1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh 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 3 of the License, or (at your
14 option) any later version.
16 cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
28 Changes the boundary of the mesh template, such that each boundary cell
29 has only one boundary face.
34 \*---------------------------------------------------------------------------*/
36 #ifndef surfaceMorpherCells_H
37 #define surfaceMorpherCells_H
39 #include "polyMeshGenModifier.H"
40 #include "labelLongList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class surfaceMorpherCells Declaration
50 \*---------------------------------------------------------------------------*/
52 class surfaceMorpherCells
58 //- number of internal faces
61 //- true for vertices which are at the boundary
62 boolList boundaryVertex_;
64 //- true for cells which are at the boundary
65 List<direction> cellFlags_;
67 //- new boundary faces and owner cells
68 VRWGraph newBoundaryFaces_;
69 labelLongList newBoundaryOwners_;
70 labelLongList newBoundaryPatches_;
72 // Private enumerators
80 // Private member functions
81 //- find surface vertices
82 void findBoundaryVertices();
84 //- find boundary cells
85 void findBoundaryCells();
87 //- remove cells with all vertices at the boundary
88 bool removeCellsWithAllVerticesAtTheBoundary();
90 //- morph boundary faces
91 bool morphBoundaryFaces();
93 //- morph internal faces
94 bool morphInternalFaces();
96 //- replace the boundary of the mesh with the newly created one
97 void replaceMeshBoundary();
99 //- Disallow default bitwise copy construct
100 surfaceMorpherCells(const surfaceMorpherCells&);
102 //- Disallow default bitwise assignment
103 void operator=(const surfaceMorpherCells&);
109 //- Construct from points and cell shapes
110 surfaceMorpherCells(polyMeshGen& mesh);
114 ~surfaceMorpherCells();
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 } // End namespace Foam
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 // ************************************************************************* //