Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::shortEdgeFilter2D
28
29Description
30 This class filters short edges generated by the CV2D mesher.
31
32SourceFiles
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
45namespace Foam
46{
48/*---------------------------------------------------------------------------*\
49 Class shortEdgeFilter2D Declaration
50\*---------------------------------------------------------------------------*/
51
52class shortEdgeFilter2D
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
94public:
95
96 //- Runtime type information
97 ClassName("shortEdgeFilter2D");
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
123 {
124 return mapEdgesRegion_;
125 }
126
128 {
129 return ms_;
130 }
131
133 // Member Functions
134
135 void filter();
136
137 void writeInfo(Ostream& os);
138};
139
141// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143} // End namespace Foam
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#endif
148
149// ************************************************************************* //
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
Definition CV2D.H:145
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition DynamicList.H:68
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric.
Definition edgeHashes.H:59
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const MeshedSurface< face > & fMesh() const
const EdgeMap< label > & mapEdgesRegion() const
const labelList & patchSizes() const
shortEdgeFilter2D(const CV2D &cv2Dmesh, const dictionary &dict)
Construct from components.
void writeInfo(Ostream &os)
~shortEdgeFilter2D()=default
Destructor.
const wordList & patchNames() const
ClassName("shortEdgeFilter2D")
Runtime type information.
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
Definition surfMesh.H:67
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition className.H:74
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
List< label > labelList
A List of labels.
Definition List.H:62
dictionary dict