shortEdgeFilter2D.H
Go to the documentation of this file.
1 /*--------------------------------*- C++ -*----------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2013-2019 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 
94 public:
95 
96  //- Runtime type information
97  ClassName("shortEdgeFilter2D");
98 
99  // Constructors
100 
101  shortEdgeFilter2D(const CV2D& cv2Dmesh, const dictionary& dict);
102 
103  //- Disallow default bitwise copy construction
104  shortEdgeFilter2D(const shortEdgeFilter2D&) = delete;
105 
106 
107  //- Destructor
109 
110 
111  // Access Functions
113  const wordList& patchNames() const
114  {
115  return patchNames_;
116  }
118  const labelList& patchSizes() const
119  {
120  return patchSizes_;
121  }
123  const EdgeMap<label>& mapEdgesRegion() const
124  {
125  return mapEdgesRegion_;
126  }
128  const MeshedSurface<face>& fMesh() const
129  {
130  return ms_;
131  }
132 
133 
134  // Member Functions
135 
136  void filter();
137 
138  void writeInfo(Ostream& os);
139 
140 
141  // Member Operators
142 
143  //- Disallow default bitwise assignment
144  void operator=(const shortEdgeFilter2D&) = delete;
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
~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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const MeshedSurface< face > & fMesh() const
ClassName("shortEdgeFilter2D")
Runtime type information.
shortEdgeFilter2D(const CV2D &cv2Dmesh, const dictionary &dict)
const labelList & patchSizes() const
void operator=(const shortEdgeFilter2D &)=delete
Disallow default bitwise assignment.
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
const EdgeMap< label > & mapEdgesRegion() const
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
Definition: CV2D.H:144
const wordList & patchNames() const
This class filters short edges generated by the CV2D mesher.
void writeInfo(Ostream &os)
Namespace for OpenFOAM.