Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
utilities
mesh
manipulation
splitMesh
regionSide.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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::regionSide
26
27
Description
28
Determines the 'side' for every face and connected to a
29
singly-connected (through edges) region of faces. Gets set of faces and
30
a list of mesh edges ('fenceEdges') which should not be crossed.
31
Used in splitting a mesh region.
32
33
Determines:
34
- For every face on the surface: whether the owner was visited
35
from starting face.
36
- List of faces using an internal point of the region visitable by
37
edge-face-edge walking from the correct side of the region.
38
39
SourceFiles
40
regionSide.C
41
42
\*---------------------------------------------------------------------------*/
43
44
#ifndef regionSide_H
45
#define regionSide_H
46
47
#include <
OpenFOAM/HashSet.H
>
48
#include <
OpenFOAM/typeInfo.H
>
49
50
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52
namespace
Foam
53
{
54
55
// Forward declaration of classes
56
class
primitiveMesh;
57
58
/*---------------------------------------------------------------------------*\
59
Class regionSide Declaration
60
\*---------------------------------------------------------------------------*/
61
62
class
regionSide
63
{
64
// Private data
65
66
//- For every face on region tells whether the owner is on the
67
// 'regionside'.
68
labelHashSet
sideOwner_;
69
70
//- Contains the faces using an internal point and visited face
71
labelHashSet
insidePointFaces_;
72
73
74
// Private Member Functions
75
76
//- Step across point to other edge on face
77
static
label otherEdge
78
(
79
const
primitiveMesh
&
mesh
,
80
const
label faceI,
81
const
label edgeI,
82
const
label pointI
83
);
84
85
//- From faceI, side cellI, cross to other faces/cells by
86
// face-cell walking and store visited faces and update sideOwner_.
87
void
visitConnectedFaces
88
(
89
const
primitiveMesh
& mesh,
90
const
labelHashSet
& region,
91
const
labelHashSet
& fenceEdges,
92
const
label cellI,
93
const
label faceI,
94
labelHashSet
& visitedFace
95
);
96
97
//- From edge on face connected to point on region (regionPointI) cross
98
// to all other edges using this point by walking across faces
99
// Does not cross regionEdges so stays on one side of region
100
void
walkPointConnectedFaces
101
(
102
const
primitiveMesh
& mesh,
103
const
labelHashSet
& regionEdges,
104
const
label regionPointI,
105
const
label startFaceI,
106
const
label startEdgeI,
107
labelHashSet
& visitedEdges
108
);
109
110
//- Visits all internal points on region and marks edges reachable
111
// from sideOwner side (using walkPointConnectedFaces)
112
void
walkAllPointConnectedFaces
113
(
114
const
primitiveMesh
& mesh,
115
const
labelHashSet
& regionFaces,
116
const
labelHashSet
& fenceEdges
117
);
118
119
public
:
120
121
//- Runtime type information
122
ClassName
(
"regionSide"
);
123
124
// Static Functions
125
126
//- Step across edge onto other face on cell
127
static
label
otherFace
128
(
129
const
primitiveMesh
& mesh,
130
const
label cellI,
131
const
label excludeFaceI,
132
const
label edgeI
133
);
134
135
136
// Constructors
137
138
//- Construct from components
139
regionSide
140
(
141
const
primitiveMesh
& mesh,
142
const
labelHashSet
& region,
143
const
labelHashSet
& fenceEdges,
// labels of fence edges
144
const
label startCell,
145
const
label startFace
146
);
147
148
149
// Member Functions
150
151
// Access
152
153
const
labelHashSet
&
sideOwner
()
const
154
{
155
return
sideOwner_;
156
}
157
158
const
labelHashSet
&
insidePointFaces
()
const
159
{
160
return
insidePointFaces_;
161
}
162
163
};
164
165
166
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168
}
// End namespace Foam
169
170
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172
#endif
173
174
// ************************ vim: set sw=4 sts=4 et: ************************ //