checkIrregularSurfaceConnections.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  checkIrregularSurfaceConnections
26 
27 Description
28  Check mesh surface for for connections which cannot exist in a valid mesh.
29  In case some irregular connections exist, it is possible to fix them.
30 
31 SourceFiles
32  checkIrregularSurfaceConnections.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef checkIrregularSurfaceConnections_H
37 #define checkIrregularSurfaceConnections_H
38 
39 #include "polyMeshGenModifier.H"
40 #include "meshSurfaceEngine.H"
41 #include "HashSet.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class checkIrregularSurfaceConnections Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private data
55  //- Reference to polyMeshGen
57 
58  //- pointer to meshSurfaceEngine
60 
61  // Private member functions
62  //- create meshSurfaceEngine
63  inline const meshSurfaceEngine& surfaceEngine() const
64  {
65  if( !meshSurfacePtr_ )
67 
68  return *meshSurfacePtr_;
69  }
70 
71  //- clear meshSurfaceEngine. Used in case if the mesh is modified
72  inline void clearMeshEngine()
73  {
75  }
76 
77  //- check if there exist vertices with more than one groups of cells
78  //- attached to it
80  (
81  labelHashSet& badVertices,
82  const bool removeConnections = false
83  );
84 
85  //- check if all boundary edges are connected
86  //- to two boundary faces, only!
88  (
89  labelHashSet& badVertices,
90  const bool removeCells = false
91  );
92 
93  //- check if all boundary face connected to a boundary vertex
94  //- are connected into a single group of faces that can be visited
95  //- over edges
97  (
98  labelHashSet& badVertices,
99  const bool removeCells = false
100  );
101 
102  //- Disallow default bitwise copy construct
104  (
106  );
107 
108  //- Disallow default bitwise assignment
110 
111 public:
112 
113  // Constructors
114 
115  //- Construct from polyMeshGen
117 
118  // Destructor
119 
121 
122  // Member Functions
123  //- find vertices where the surface is not valid
124  void checkIrregularVertices(labelHashSet& badVertices);
125 
126  //- find invalid connections and fix them on the fly
128 };
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Foam::checkIrregularSurfaceConnections::~checkIrregularSurfaceConnections
~checkIrregularSurfaceConnections()
Definition: checkIrregularSurfaceConnections.C:52
Foam::removeCells
Given list of cells to remove insert all the topology changes.
Definition: removeCells.H:59
Foam::checkIrregularSurfaceConnections::surfaceEngine
const meshSurfaceEngine & surfaceEngine() const
create meshSurfaceEngine
Definition: checkIrregularSurfaceConnections.H:62
Foam::checkIrregularSurfaceConnections::checkAndFixIrregularConnections
bool checkAndFixIrregularConnections()
find invalid connections and fix them on the fly
Definition: checkIrregularSurfaceConnections.C:73
Foam::checkIrregularSurfaceConnections
Definition: checkIrregularSurfaceConnections.H:51
polyMeshGenModifier.H
Foam::checkIrregularSurfaceConnections::checkEdgeFaceConnections
bool checkEdgeFaceConnections(labelHashSet &badVertices, const bool removeCells=false)
Definition: checkIrregularSurfaceConnectionsFunctions.C:464
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::checkIrregularSurfaceConnections::mesh_
polyMeshGen & mesh_
Reference to polyMeshGen.
Definition: checkIrregularSurfaceConnections.H:55
Foam::HashSet< label, Hash< label > >
Foam::deleteDemandDrivenData
void deleteDemandDrivenData(DataPtr &dataPtr)
Definition: demandDrivenData.H:40
Foam::checkIrregularSurfaceConnections::clearMeshEngine
void clearMeshEngine()
clear meshSurfaceEngine. Used in case if the mesh is modified
Definition: checkIrregularSurfaceConnections.H:71
Foam::checkIrregularSurfaceConnections::operator=
void operator=(const checkIrregularSurfaceConnections &)
Disallow default bitwise assignment.
Foam::checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices
bool checkAndFixCellGroupsAtBndVertices(labelHashSet &badVertices, const bool removeConnections=false)
Definition: checkIrregularSurfaceConnectionsFunctions.C:47
HashSet.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
meshSurfaceEngine.H
Foam::checkIrregularSurfaceConnections::checkIrregularVertices
void checkIrregularVertices(labelHashSet &badVertices)
find vertices where the surface is not valid
Definition: checkIrregularSurfaceConnections.C:62
Foam::checkIrregularSurfaceConnections::meshSurfacePtr_
meshSurfaceEngine * meshSurfacePtr_
pointer to meshSurfaceEngine
Definition: checkIrregularSurfaceConnections.H:58
Foam::checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices
bool checkFaceGroupsAtBndVertices(labelHashSet &badVertices, const bool removeCells=false)
Definition: checkIrregularSurfaceConnectionsFunctions.C:603
Foam::checkIrregularSurfaceConnections::checkIrregularSurfaceConnections
checkIrregularSurfaceConnections(const checkIrregularSurfaceConnections &)
Disallow default bitwise copy construct.
Foam::meshSurfaceEngine
Definition: meshSurfaceEngine.H:54