decomposeCells.H
Go to the documentation of this file.
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.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  decomposeCells
26 
27 Description
28  Decomposes selected cells into pyramids
29 
30 SourceFiles
31 
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef decomposeCells_H
36 #define decomposeCells_H
37 
38 #include "polyMeshGenModifier.H"
39 #include "VRWGraphList.H"
40 #include "DynList.H"
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class decomposeCells Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class decomposeCells
50 {
51  // private data
52  //- reference to the mesh
54 
55  //- new boundary faces
60 
62 
63  // Private member functions
64 
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);
69 
70  //- create addressing needed to decompose the cell
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;
79 
80  //- find the apex of the pyramids
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  );
88 
89  void decomposeCellIntoPyramids(const label cellI);
90 
91  void createPointsAndCellFaces(const boolList& decomposeCell);
92 
93  void storeBoundaryFaces(const boolList& decomposeCell);
94 
95  void removeDecomposedCells(const boolList& decomposeCell);
96 
97  void addNewCells();
98 
99  //- disallows bitwise construct
100  void operator=(const decomposeCells&);
101 
102  //- copy constructor
104 
105 public:
106 
107  // Constructors
108  //- construct from polyMeshGen and a list containing patches
109  //- for each point
111 
112  //- Destructor
113  ~decomposeCells();
114 
115  // Member functions
116 
117  //- perform decomposition of selected cell into pyramids
118  void decomposeMesh(const boolList&);
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
Foam::decomposeCells::facesOfNewCells_
VRWGraphList facesOfNewCells_
Definition: decomposeCells.H:60
Foam::decomposeCells::decomposeMesh
void decomposeMesh(const boolList &)
perform decomposition of selected cell into pyramids
Definition: decomposeCellsDecomposition.C:42
Foam::decomposeCells::patchTypes_
wordList patchTypes_
Definition: decomposeCells.H:56
Foam::decomposeCells::findTopVertex
label findTopVertex(const label cellI, const DynList< label, 32 > &vrt, const DynList< edge, 64 > &edges, const DynList< DynList< label, 2 >, 64 > &edgeFaces)
find the apex of the pyramids
Definition: decomposeCellsPyramids.C:128
Foam::decomposeCells::newBoundaryFaces_
VRWGraph newBoundaryFaces_
Definition: decomposeCells.H:57
polyMeshGenModifier.H
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::decomposeCells::removeDecomposedCells
void removeDecomposedCells(const boolList &decomposeCell)
Definition: decomposeCellsDecomposition.C:178
Foam::VRWGraphList
Definition: VRWGraphList.H:51
Foam::LongList< label >
Foam::decomposeCells::mesh_
polyMeshGen & mesh_
reference to the mesh
Definition: decomposeCells.H:52
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::decomposeCells::patchNames_
wordList patchNames_
new boundary faces
Definition: decomposeCells.H:55
Foam::decomposeCells::storeBoundaryFaces
void storeBoundaryFaces(const boolList &decomposeCell)
Definition: decomposeCellsDecomposition.C:165
Foam::decomposeCells::addNewCells
void addNewCells()
Definition: decomposeCellsDecomposition.C:192
Foam::decomposeCells::decomposeCells
decomposeCells(const decomposeCells &)
copy constructor
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::decomposeCells::~decomposeCells
~decomposeCells()
Destructor.
Definition: decomposeCells.C:53
Foam::decomposeCells::decomposeCellIntoPyramids
void decomposeCellIntoPyramids(const label cellI)
Definition: decomposeCellsPyramids.C:160
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::DynList
Definition: DynList.H:53
Foam::decomposeCells
Definition: decomposeCells.H:48
Foam::decomposeCells::findAddressingForCell
void findAddressingForCell(const label cellI, DynList< label, 32 > &vrt, DynList< edge, 64 > &edges, DynList< DynList< label, 8 > > &faceEdges, DynList< DynList< label, 2 >, 64 > &edgeFaces) const
create addressing needed to decompose the cell
Definition: decomposeCellsPyramids.C:40
Foam::decomposeCells::operator=
void operator=(const decomposeCells &)
disallows bitwise construct
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::decomposeCells::checkFaceConnections
void checkFaceConnections(const boolList &decomposeCell)
Definition: decomposeCellsDecomposition.C:59
Foam::decomposeCells::createPointsAndCellFaces
void createPointsAndCellFaces(const boolList &decomposeCell)
Definition: decomposeCellsDecomposition.C:154
Foam::decomposeCells::newBoundaryPatches_
labelLongList newBoundaryPatches_
Definition: decomposeCells.H:58
Foam::VRWGraph
Definition: VRWGraph.H:101
VRWGraphList.H
DynList.H