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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::shortEdgeFilter2D
28 
29 Description
30  This class filters short edges generated by the CV2D mesher.
31 
32 SourceFiles
33  shortEdgeFilter2D.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef shortEdgeFilter2D_H
38 #define shortEdgeFilter2D_H
39 
40 #include "MeshedSurfaces.H"
41 #include "CV2D.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class shortEdgeFilter2D Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private data
55 
56  const CV2D& cv2Dmesh_;
57 
59 
60  const scalar shortEdgeFilterFactor_;
61 
62  const scalar edgeAttachedToBoundaryFactor_;
63 
64  wordList patchNames_;
65 
66  labelList patchSizes_;
67 
68  EdgeMap<label> mapEdgesRegion_;
69 
70  EdgeMap<label> indirectPatchEdge_;
71 
72 
73  // Private Member Functions
74 
75  void addRegion
76  (
77  const label regionI,
78  DynamicList<label>& bPointRegions
79  ) const;
80 
81  void assignBoundaryPointRegions
82  (
83  List<DynamicList<label>>& boundaryPointRegions
84  ) const;
85 
86  void updateEdgeRegionMap
87  (
89  const List<DynamicList<label>>& boundaryPtRegions,
90  const labelList& surfPtToBoundaryPt,
93  ) const;
94 
95  //- No copy construct
96  shortEdgeFilter2D(const shortEdgeFilter2D&) = delete;
97 
98  //- No copy assignment
99  void operator=(const shortEdgeFilter2D&) = delete;
100 
101 
102 public:
103 
104  //- Runtime type information
105  ClassName("shortEdgeFilter2D");
106 
107  // Constructors
108 
109  shortEdgeFilter2D(const CV2D& cv2Dmesh, const dictionary& dict);
110 
111 
112  //- Destructor
114 
115 
116  // Access Functions
117 
118  const wordList& patchNames() const
119  {
120  return patchNames_;
121  }
122 
123  const labelList& patchSizes() const
124  {
125  return patchSizes_;
126  }
127 
128  const EdgeMap<label>& mapEdgesRegion() const
129  {
130  return mapEdgesRegion_;
131  }
132 
133  const MeshedSurface<face>& fMesh() const
134  {
135  return ms_;
136  }
137 
138 
139  // Member Functions
140 
141  void filter();
142 
143  void writeInfo(Ostream& os);
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
Foam::shortEdgeFilter2D::ClassName
ClassName("shortEdgeFilter2D")
Runtime type information.
Foam::shortEdgeFilter2D
This class filters short edges generated by the CV2D mesher.
Definition: shortEdgeFilter2D.H:51
Foam::shortEdgeFilter2D::~shortEdgeFilter2D
~shortEdgeFilter2D()
Destructor.
Foam::DynamicList< label >
Foam::shortEdgeFilter2D::writeInfo
void writeInfo(Ostream &os)
Foam::shortEdgeFilter2D::mapEdgesRegion
const EdgeMap< label > & mapEdgesRegion() const
Definition: shortEdgeFilter2D.H:127
Foam::surfMesh
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
Definition: surfMesh.H:63
Foam::CV2D
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
Definition: CV2D.H:146
Foam::shortEdgeFilter2D::fMesh
const MeshedSurface< face > & fMesh() const
Definition: shortEdgeFilter2D.H:132
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::shortEdgeFilter2D::filter
void filter()
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::shortEdgeFilter2D::patchSizes
const labelList & patchSizes() const
Definition: shortEdgeFilter2D.H:122
Foam::EdgeMap< label >
Foam::shortEdgeFilter2D::patchNames
const wordList & patchNames() const
Definition: shortEdgeFilter2D.H:117
Foam::List< word >
MeshedSurfaces.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::MeshedSurface< face >
CV2D.H