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 
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 assignBoundaryPointRegions
74  (
75  List<DynamicList<label>>& boundaryPointRegions
76  ) const;
77 
78  void updateEdgeRegionMap
79  (
81  const List<DynamicList<label>>& boundaryPtRegions,
82  const labelList& surfPtToBoundaryPt,
85  ) const;
86 
87  //- No copy construct
88  shortEdgeFilter2D(const shortEdgeFilter2D&) = delete;
89 
90  //- No copy assignment
91  void operator=(const shortEdgeFilter2D&) = delete;
92 
93 
94 public:
95 
96  //- Runtime type information
97  ClassName("shortEdgeFilter2D");
98 
99 
100  // Constructors
101 
102  //- Construct from components
103  shortEdgeFilter2D(const CV2D& cv2Dmesh, const dictionary& dict);
104 
105 
106  //- Destructor
107  ~shortEdgeFilter2D() = default;
108 
109 
110  // Access Functions
111 
112  const wordList& patchNames() const
113  {
114  return patchNames_;
115  }
116 
117  const labelList& patchSizes() const
118  {
119  return patchSizes_;
120  }
121 
122  const EdgeMap<label>& mapEdgesRegion() const
123  {
124  return mapEdgesRegion_;
125  }
126 
127  const MeshedSurface<face>& fMesh() const
128  {
129  return ms_;
130  }
131 
132 
133  // Member Functions
134 
135  void filter();
136 
137  void writeInfo(Ostream& os);
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
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::DynamicList< label >
Foam::shortEdgeFilter2D::writeInfo
void writeInfo(Ostream &os)
Foam::shortEdgeFilter2D::mapEdgesRegion
const EdgeMap< label > & mapEdgesRegion() const
Definition: shortEdgeFilter2D.H:121
Foam::shortEdgeFilter2D::~shortEdgeFilter2D
~shortEdgeFilter2D()=default
Destructor.
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:126
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:123
Foam::shortEdgeFilter2D::filter
void filter()
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::shortEdgeFilter2D::patchSizes
const labelList & patchSizes() const
Definition: shortEdgeFilter2D.H:116
Foam::EdgeMap< label >
Foam::shortEdgeFilter2D::patchNames
const wordList & patchNames() const
Definition: shortEdgeFilter2D.H:111
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