topologicalCleaner.C
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 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "demandDrivenData.H"
29 #include "topologicalCleaner.H"
30 #include "decomposeCells.H"
32 #include "meshSurfaceEngine.H"
33 
34 // #define DEBUGSearch
35 
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 
38 namespace Foam
39 {
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
44 {
45  if( !changed_ )
46  return;
47 
50 
51 }
52 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
53 
54 // Construct from points, cells, boundary faces, and octree
56 (
58 )
59 :
60  mesh_(mesh),
61  changed_(false),
62  decomposeCell_(mesh.cells().size(), false)
63 {
64 }
65 
66 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
67 
69 {
70 }
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
75 {
77 
79 
81 
83 
85 
87 
88  if( checkCellConnectionsOverFaces(mesh_).checkCellGroups() )
89  changed_ = true;
90 
91  return changed_;
92 }
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 } // End namespace Foam
97 
98 // ************************************************************************* //
Foam::decomposeCells::decomposeMesh
void decomposeMesh(const boolList &)
perform decomposition of selected cell into pyramids
Definition: decomposeCellsDecomposition.C:42
Foam::checkCellConnectionsOverFaces
Definition: checkCellConnectionsOverFaces.H:48
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
decomposeCells.H
Foam::topologicalCleaner::decomposeCells
void decomposeCells()
decompose marked cells
Definition: topologicalCleaner.C:43
Foam::primitiveMesh::cells
const cellList & cells() const
Definition: primitiveMeshCells.C:136
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
topologicalCleaner.H
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::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
meshSurfaceEngine.H
Foam::topologicalCleaner::checkNonMappableCells
void checkNonMappableCells()
check and fix non-mappable cells
Definition: topologyCleanerNonMappableCells.C:42
Foam::topologicalCleaner::~topologicalCleaner
~topologicalCleaner()
Definition: topologicalCleaner.C:68
Foam::decomposeCells
Definition: decomposeCells.H:48
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
checkCellConnectionsOverFaces.H
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