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 
55 
56  const scalar shortEdgeFilterFactor_;
57 
58  const scalar edgeAttachedToBoundaryFactor_;
59 
60  wordList patchNames_;
61 
62  labelList patchSizes_;
63 
64  EdgeMap<label> mapEdgesRegion_;
65 
66  EdgeMap<label> indirectPatchEdge_;
67 
68 
69  // Private Member Functions
70 
71  void addRegion
72  (
73  const label regionI,
74  DynamicList<label>& bPointRegions
75  ) const;
76 
77  void assignBoundaryPointRegions
78  (
79  List<DynamicList<label>>& boundaryPointRegions
80  ) const;
81 
82  void updateEdgeRegionMap
83  (
85  const List<DynamicList<label>>& boundaryPtRegions,
86  const labelList& surfPtToBoundaryPt,
89  ) const;
90 
91 
92 public:
93 
94  //- Runtime type information
95  ClassName("shortEdgeFilter2D");
96 
97  // Constructors
98 
99  shortEdgeFilter2D(const CV2D& cv2Dmesh, const dictionary& dict);
100 
101  //- Disallow default bitwise copy construction
102  shortEdgeFilter2D(const shortEdgeFilter2D&) = delete;
103 
104 
105  //- Destructor
107 
108 
109  // Access Functions
111  const wordList& patchNames() const
112  {
113  return patchNames_;
114  }
116  const labelList& patchSizes() const
117  {
118  return patchSizes_;
119  }
121  const EdgeMap<label>& mapEdgesRegion() const
122  {
123  return mapEdgesRegion_;
124  }
126  const MeshedSurface<face>& fMesh() const
127  {
128  return ms_;
129  }
130 
131 
132  // Member Functions
133 
134  void filter();
135 
136  void writeInfo(Ostream& os);
137 
138 
139  // Member Operators
140 
141  //- Disallow default bitwise assignment
142  void operator=(const shortEdgeFilter2D&) = delete;
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
~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:54
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.