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-2015 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 
63 
65 
67 
69 
70 
71  // Private Member Functions
72 
73  void addRegion
74  (
75  const label regionI,
76  DynamicList<label>& bPointRegions
77  ) const;
78 
80  (
81  List<DynamicList<label> >& boundaryPointRegions
82  ) const;
83 
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
115 
116  const wordList& patchNames() const
117  {
118  return patchNames_;
119  }
120 
121  const labelList& patchSizes() const
122  {
123  return patchSizes_;
124  }
125 
126  const EdgeMap<label>& mapEdgesRegion() const
127  {
128  return mapEdgesRegion_;
129  }
130 
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 // ************************************************************************* //
Foam::shortEdgeFilter2D::ClassName
ClassName("shortEdgeFilter2D")
Runtime type information.
Foam::shortEdgeFilter2D
This class filters short edges generated by the CV2D mesher.
Definition: shortEdgeFilter2D.H:49
Foam::shortEdgeFilter2D::updateEdgeRegionMap
void updateEdgeRegionMap(const MeshedSurface< face > &surfMesh, const List< DynamicList< label > > &boundaryPtRegions, const labelList &surfPtToBoundaryPt, EdgeMap< label > &mapEdgesRegion, labelList &patchSizes) const
Foam::shortEdgeFilter2D::~shortEdgeFilter2D
~shortEdgeFilter2D()
Destructor.
Foam::shortEdgeFilter2D::cv2Dmesh_
const CV2D & cv2Dmesh_
Definition: shortEdgeFilter2D.H:53
Foam::DynamicList< label >
Foam::shortEdgeFilter2D::writeInfo
void writeInfo(Ostream &os)
Foam::shortEdgeFilter2D::patchSizes_
labelList patchSizes_
Definition: shortEdgeFilter2D.H:63
Foam::shortEdgeFilter2D::mapEdgesRegion
const EdgeMap< label > & mapEdgesRegion() const
Definition: shortEdgeFilter2D.H:125
Foam::shortEdgeFilter2D::operator=
void operator=(const shortEdgeFilter2D &)
Disallow default bitwise assignment.
Foam::surfMesh
A surface mesh consisting of general polygon faces.
Definition: surfMesh.H:55
Foam::shortEdgeFilter2D::addRegion
void addRegion(const label regionI, DynamicList< label > &bPointRegions) const
Foam::shortEdgeFilter2D::shortEdgeFilter2D
shortEdgeFilter2D(const shortEdgeFilter2D &)
Disallow default bitwise copy construct.
Foam::label
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
Foam::CV2D
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
Definition: CV2D.H:146
Foam::shortEdgeFilter2D::assignBoundaryPointRegions
void assignBoundaryPointRegions(List< DynamicList< label > > &boundaryPointRegions) const
Foam::shortEdgeFilter2D::fMesh
const MeshedSurface< face > & fMesh() const
Definition: shortEdgeFilter2D.H:130
Foam::shortEdgeFilter2D::patchNames_
wordList patchNames_
Definition: shortEdgeFilter2D.H:61
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::shortEdgeFilter2D::indirectPatchEdge_
EdgeMap< label > indirectPatchEdge_
Definition: shortEdgeFilter2D.H:67
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::shortEdgeFilter2D::filter
void filter()
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::shortEdgeFilter2D::patchSizes
const labelList & patchSizes() const
Definition: shortEdgeFilter2D.H:120
Foam::shortEdgeFilter2D::ms_
MeshedSurface< face > ms_
Definition: shortEdgeFilter2D.H:55
Foam::EdgeMap< label >
Foam::shortEdgeFilter2D::patchNames
const wordList & patchNames() const
Definition: shortEdgeFilter2D.H:115
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
MeshedSurfaces.H
Foam::shortEdgeFilter2D::shortEdgeFilterFactor_
const scalar shortEdgeFilterFactor_
Definition: shortEdgeFilter2D.H:57
Foam::shortEdgeFilter2D::edgeAttachedToBoundaryFactor_
const scalar edgeAttachedToBoundaryFactor_
Definition: shortEdgeFilter2D.H:59
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::MeshedSurface< face >
Foam::shortEdgeFilter2D::mapEdgesRegion_
EdgeMap< label > mapEdgesRegion_
Definition: shortEdgeFilter2D.H:65
CV2D.H