Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / src / mesh / cfMesh / utilities / decomposeCells / decomposeCells.H
blob51ad5ae2db322a1a84ab1edd5660e4d3f27c916f
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | cfMesh: A library for mesh generation
4    \\    /   O peration     |
5     \\  /    A nd           | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6      \\/     M anipulation  | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     decomposeCells
27 Description
28     Decomposes selected cells into pyramids
30 SourceFiles
33 \*---------------------------------------------------------------------------*/
35 #ifndef decomposeCells_H
36 #define decomposeCells_H
38 #include "polyMeshGenModifier.H"
39 #include "VRWGraphList.H"
40 #include "DynList.H"
42 namespace Foam
45 /*---------------------------------------------------------------------------*\
46                     Class decomposeCells Declaration
47 \*---------------------------------------------------------------------------*/
49 class decomposeCells
51     // private data
52         //- reference to the mesh
53         polyMeshGen& mesh_;
55         //- new boundary faces
56         wordList patchNames_;
57         wordList patchTypes_;
58         VRWGraph newBoundaryFaces_;
59         labelLongList newBoundaryPatches_;
61         VRWGraphList facesOfNewCells_;
63     // Private member functions
65         //- check if the valid pyramids are generated from the split cells
66         //- this check splits faces which could
67         //- result in multiple inbetween faces
68         void checkFaceConnections(const boolList& decomposeCell);
70         //- create addressing needed to decompose the cell
71         void findAddressingForCell
72         (
73             const label cellI,
74             DynList<label, 32>& vrt,
75             DynList<edge, 64>& edges,
76             DynList<DynList<label, 8> >& faceEdges,
77             DynList<DynList<label, 2>, 64>& edgeFaces
78         ) const;
80         //- find the apex of the pyramids
81         label findTopVertex
82         (
83             const label cellI,
84             const DynList<label, 32>& vrt,
85             const DynList<edge, 64>& edges,
86             const DynList<DynList<label, 2>, 64>& edgeFaces
87         );
89         void decomposeCellIntoPyramids(const label cellI);
91         void createPointsAndCellFaces(const boolList& decomposeCell);
93         void storeBoundaryFaces(const boolList& decomposeCell);
95         void removeDecomposedCells(const boolList& decomposeCell);
97         void addNewCells();
99         //- disallows bitwise construct
100         void operator=(const decomposeCells&);
102         //- copy constructor
103         decomposeCells(const decomposeCells&);
105 public:
107     // Constructors
108         //- construct from polyMeshGen and a list containing patches
109         //- for each point
110         decomposeCells(polyMeshGen& mesh);
112         //- Destructor
113         ~decomposeCells();
115     // Member functions
117         //- perform decomposition of selected cell into pyramids
118         void decomposeMesh(const boolList&);
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 #endif
130 // ************************************************************************* //