shortEdgeFilter2D.H
Go to the documentation of this file.
1 /*--------------------------------*- C++ -*----------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::shortEdgeFilter2D
26 
27 Description
28  This class filters short edges generated by the CV2D mesher.
29 
30 SourceFiles
31  shortEdgeFilter2D.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef shortEdgeFilter2D_H
36 #define shortEdgeFilter2D_H
37 
38 #include "MeshedSurfaces.H"
39 #include "CV2D.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class shortEdgeFilter2D Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 {
52  // Private data
53 
54  const CV2D& cv2Dmesh_;
55 
57 
58  const scalar shortEdgeFilterFactor_;
59 
60  const scalar edgeAttachedToBoundaryFactor_;
61 
62  wordList patchNames_;
63 
64  labelList patchSizes_;
65 
66  EdgeMap<label> mapEdgesRegion_;
67 
68  EdgeMap<label> indirectPatchEdge_;
69 
70 
71  // Private Member Functions
72 
73  void addRegion
74  (
75  const label regionI,
76  DynamicList<label>& bPointRegions
77  ) const;
78 
79  void assignBoundaryPointRegions
80  (
81  List<DynamicList<label>>& boundaryPointRegions
82  ) const;
83 
84  void updateEdgeRegionMap
85  (
87  const List<DynamicList<label>>& boundaryPtRegions,
88  const labelList& surfPtToBoundaryPt,
91  ) const;
92 
93  //- Disallow default bitwise copy construct
95 
96  //- Disallow default bitwise assignment
97  void operator=(const shortEdgeFilter2D&);
98 
99 
100 public:
101 
102  //- Runtime type information
103  ClassName("shortEdgeFilter2D");
104 
105  // Constructors
106 
107  shortEdgeFilter2D(const CV2D& cv2Dmesh, const dictionary& dict);
108 
109 
110  //- Destructor
112 
113 
114  // Access Functions
116  const wordList& patchNames() const
117  {
118  return patchNames_;
119  }
121  const labelList& patchSizes() const
122  {
123  return patchSizes_;
124  }
126  const EdgeMap<label>& mapEdgesRegion() const
127  {
128  return mapEdgesRegion_;
129  }
131  const MeshedSurface<face>& fMesh() const
132  {
133  return ms_;
134  }
135 
136 
137  // Member Functions
138 
139  void filter();
140 
141  void writeInfo(Ostream& os);
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
~shortEdgeFilter2D()
Destructor.
dictionary dict
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
const EdgeMap< label > & mapEdgesRegion() const
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
const MeshedSurface< face > & fMesh() const
const wordList & patchNames() const
ClassName("shortEdgeFilter2D")
Runtime type information.
const labelList & patchSizes() const
A surface mesh consisting of general polygon faces.
Definition: surfMesh.H:55
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
Definition: CV2D.H:146
This class filters short edges generated by the CV2D mesher.
void writeInfo(Ostream &os)
Namespace for OpenFOAM.