checkNonMappableCellConnections.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  checkNonMappableCellConnections
26 
27 Description
28  Checks cell connections at the surface. Cells with all vertices at
29  the boundary are considered problematic because they get severly skewed
30  after being mapped to the geometry surface in most cases. This code performs
31  checks of cells with all vertices at the boundary with the rest of the mesh.
32  Such cells having a neighbour with all internal faces are removed.
33 
34 SourceFiles
35  checkNonMappableCellConnections.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef checkNonMappableCellConnections_H
40 #define checkNonMappableCellConnections_H
41 
42 #include "polyMeshGenModifier.H"
43 #include "HashSet.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class checkNonMappableCellConnections Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57  //- Reference to polyMeshGen
59 
60  //- type of cell
62 
63  // Enumerations
64 
65  enum cellTypes_
66  {
67  NONE = 0,
69  BNDCELL = 2,
72  };
73 
74  // Private member functions
75  //- classify cells
76  void findCellTypes();
77 
78  //- Disallow default bitwise copy construct
80 
81  //- Disallow default bitwise assignment
83 
84 public:
85 
86  // Constructors
87 
88  //- Construct from polyMeshGen and meshOctree
90 
91  // Destructor
92 
94 
95  // Member Functions
96  //- find problematic cells
97  void findCells(labelHashSet& badCells);
98 
99  //- find and remove problematic cells
100  bool removeCells();
101 };
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #endif
110 
111 // ************************************************************************* //
Foam::checkNonMappableCellConnections::operator=
void operator=(const checkNonMappableCellConnections &)
Disallow default bitwise assignment.
Foam::checkNonMappableCellConnections::~checkNonMappableCellConnections
~checkNonMappableCellConnections()
Definition: checkNonMappableCellConnections.C:168
Foam::checkNonMappableCellConnections::removeCells
bool removeCells()
find and remove problematic cells
Definition: checkNonMappableCellConnections.C:293
polyMeshGenModifier.H
Foam::checkNonMappableCellConnections::NONE
@ NONE
Definition: checkNonMappableCellConnections.H:66
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::HashSet< label, Hash< label > >
Foam::checkNonMappableCellConnections::INTERNALCELL
@ INTERNALCELL
Definition: checkNonMappableCellConnections.H:67
HashSet.H
Foam::checkNonMappableCellConnections::findCellTypes
void findCellTypes()
classify cells
Definition: checkNonMappableCellConnections.C:46
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::checkNonMappableCellConnections
Definition: checkNonMappableCellConnections.H:53
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::checkNonMappableCellConnections::ALLBNDVERTEXCELL
@ ALLBNDVERTEXCELL
Definition: checkNonMappableCellConnections.H:69
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::checkNonMappableCellConnections::cellType_
labelList cellType_
type of cell
Definition: checkNonMappableCellConnections.H:60
Foam::checkNonMappableCellConnections::cellTypes_
cellTypes_
Definition: checkNonMappableCellConnections.H:64
Foam::checkNonMappableCellConnections::findCells
void findCells(labelHashSet &badCells)
find problematic cells
Definition: checkNonMappableCellConnections.C:174
Foam::checkNonMappableCellConnections::mesh_
polyMeshGen & mesh_
Reference to polyMeshGen.
Definition: checkNonMappableCellConnections.H:57
Foam::checkNonMappableCellConnections::BNDCELL
@ BNDCELL
Definition: checkNonMappableCellConnections.H:68
Foam::checkNonMappableCellConnections::checkNonMappableCellConnections
checkNonMappableCellConnections(const checkNonMappableCellConnections &)
Disallow default bitwise copy construct.
Foam::checkNonMappableCellConnections::INTERNALFACEGROUP
@ INTERNALFACEGROUP
Definition: checkNonMappableCellConnections.H:70