topologicalCleaner.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  topologicalCleaner
26 
27 Description
28  Checks cells for invalid topologies. Decomposes bad cells into pyramids
29 
30 SourceFiles
31  topologicalCleaner.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef topologicalCleaner_H
36 #define topologicalCleaner_H
37 
38 #include "polyMeshGenModifier.H"
39 #include "boolList.H"
40 #include "HashSet.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class topologicalCleaner Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 {
53  // Private data
55 
56  bool changed_;
57 
59 
60  // Private member functions
61 
62  //- check and fix incorrectly connected faces
64 
65  //- check and fix non-mappable faces
66  void checkNonMappableFaces();
67 
68  //- check and fix non-mappable cells
69  void checkNonMappableCells();
70 
71  //- decompose marked cells
72  void decomposeCells();
73 
74  //- Disallow default bitwise copy construct
76 
77  //- Disallow default bitwise assignment
78  void operator=(const topologicalCleaner&);
79 
80 public:
81 
82  // Constructors
83 
84  //- Construct from polyMeshGen
86 
87 
88  // Destructor
89 
91 
92 
93  // Member Functions
94  //- clean topologically problematic cells
95  bool cleanTopology();
96 
97  //- check and fix vertices where two or more groups of cells meet
99  (
100  labelHashSet* irregularNodes = NULL
101  );
102 
103  //- check and fix vertices where two or more groups of faces meet
105  (
106  labelHashSet* irregularNodes = NULL
107  );
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
boolList.H
Foam::topologicalCleaner::decomposeCells
void decomposeCells()
decompose marked cells
Definition: topologicalCleaner.C:43
polyMeshGenModifier.H
Foam::topologicalCleaner::changed_
bool changed_
Definition: topologicalCleaner.H:55
Foam::topologicalCleaner::topologicalCleaner
topologicalCleaner(const topologicalCleaner &)
Disallow default bitwise copy construct.
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::HashSet< label, Hash< label > >
Foam::topologicalCleaner::cleanTopology
bool cleanTopology()
clean topologically problematic cells
Definition: topologicalCleaner.C:74
Foam::topologicalCleaner::decomposeCell_
boolList decomposeCell_
Definition: topologicalCleaner.H:57
Foam::topologicalCleaner::checkNonMappableFaces
void checkNonMappableFaces()
check and fix non-mappable faces
Definition: topologyCleanerNonMappableCells.C:79
Foam::topologicalCleaner
Definition: topologicalCleaner.H:50
HashSet.H
Foam::topologicalCleaner::checkNonConsecutiveBoundaryVertices
void checkNonConsecutiveBoundaryVertices()
check and fix incorrectly connected faces
Definition: topologyCleanerNonConsecutiveBoundaryVertices.C:41
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::topologicalCleaner::mesh_
polyMeshGen & mesh_
Definition: topologicalCleaner.H:53
Foam::topologicalCleaner::checkNonMappableCells
void checkNonMappableCells()
check and fix non-mappable cells
Definition: topologyCleanerNonMappableCells.C:42
Foam::topologicalCleaner::operator=
void operator=(const topologicalCleaner &)
Disallow default bitwise assignment.
Foam::topologicalCleaner::~topologicalCleaner
~topologicalCleaner()
Definition: topologicalCleaner.C:68
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::topologicalCleaner::checkInvalidConnectionsForVerticesCells
void checkInvalidConnectionsForVerticesCells(labelHashSet *irregularNodes=NULL)
check and fix vertices where two or more groups of cells meet
Definition: topologicalCleanerInvalidVertices.C:45
Foam::topologicalCleaner::checkInvalidConnectionsForVerticesFaces
void checkInvalidConnectionsForVerticesFaces(labelHashSet *irregularNodes=NULL)
check and fix vertices where two or more groups of faces meet
Definition: topologicalCleanerInvalidVertices.C:180