OpenFOAM
6
The OpenFOAM Foundation
Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
+
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Related Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Typedefs
b
c
d
f
g
k
l
m
p
r
s
t
v
w
+
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
meshTools
triSurface
triSurfaceSearch
triSurfaceRegionSearch.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2018 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::triSurfaceRegionSearch
26
27
Description
28
Helper class to search on triSurface. Creates an octree for each region of
29
the surface and only searches on the specified regions.
30
31
SourceFiles
32
triSurfaceRegionSearch.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef triSurfaceRegionSearch_H
37
#define triSurfaceRegionSearch_H
38
39
#include "
pointField.H
"
40
#include "
pointIndexHit.H
"
41
#include "
triSurfaceSearch.H
"
42
#include "
labelledTri.H
"
43
#include "
IndirectList.H
"
44
#include "
PtrList.H
"
45
#include "
indexedOctree.H
"
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
52
/*---------------------------------------------------------------------------*\
53
Class triSurfaceRegionSearch Declaration
54
\*---------------------------------------------------------------------------*/
55
56
class
triSurfaceRegionSearch
57
:
58
public
triSurfaceSearch
59
{
60
// Private typedefs
61
62
typedef
PrimitivePatch
63
<
64
labelledTri
,
65
IndirectList
,
66
const
pointField
&
67
>
indirectTriSurface
;
68
69
typedef
treeDataPrimitivePatch<indirectTriSurface>
70
treeDataIndirectTriSurface
;
71
72
typedef
indexedOctree<treeDataIndirectTriSurface>
treeType
;
73
74
75
// Private data
76
77
//- Surface is split into patches by region
78
mutable
PtrList<indirectTriSurface>
indirectRegionPatches_;
79
80
//- Search tree for each region
81
mutable
PtrList<treeType>
treeByRegion_;
82
83
84
// Private Member Functions
85
86
//- Disallow default bitwise copy construct
87
triSurfaceRegionSearch
(
const
triSurfaceRegionSearch
&);
88
89
//- Disallow default bitwise assignment
90
void
operator=(
const
triSurfaceRegionSearch
&);
91
92
93
public
:
94
95
// Constructors
96
97
//- Construct from surface. Holds reference to surface!
98
explicit
triSurfaceRegionSearch
(
const
triSurface
&);
99
100
//- Construct from surface and dictionary. Holds reference to surface!
101
triSurfaceRegionSearch
(
const
triSurface
&,
const
dictionary
&
dict
);
102
103
104
//- Destructor
105
~triSurfaceRegionSearch
();
106
107
//- Clear storage
108
void
clearOut
();
109
110
111
// Member Functions
112
113
// Access
114
115
//- Demand driven construction of octree for each region.
116
// Currently creates a tree for each region; could optimise
117
// by only constructing trees when they are in regionIndices
118
const
PtrList<treeType>
&
treeByRegion
()
const
;
119
120
// Query
121
122
//- Find the nearest point on the surface out of the regions
123
// supplied in the list regionIndices. Ignores regions that are
124
// not specified
125
void
findNearest
126
(
127
const
pointField
&
samples
,
128
const
scalarField
& nearestDistSqr,
129
const
labelList
& regionIndices,
130
List<pointIndexHit>
& info
131
)
const
;
132
};
133
134
135
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137
}
// End namespace Foam
138
139
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141
#endif
142
143
// ************************************************************************* //
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::triSurfaceRegionSearch::clearOut
void clearOut()
Clear storage.
Definition:
triSurfaceRegionSearch.C:61
pointField.H
Foam::triSurfaceRegionSearch::findNearest
void findNearest(const pointField &samples, const scalarField &nearestDistSqr, const labelList ®ionIndices, List< pointIndexHit > &info) const
Find the nearest point on the surface out of the regions.
Definition:
triSurfaceRegionSearch.C:180
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition:
dictionary.H:137
Foam::List< label >
Foam::triSurfaceRegionSearch
Helper class to search on triSurface. Creates an octree for each region of the surface and only searc...
Definition:
triSurfaceRegionSearch.H:55
Foam::triSurfaceRegionSearch::~triSurfaceRegionSearch
~triSurfaceRegionSearch()
Destructor.
Definition:
triSurfaceRegionSearch.C:55
triSurfaceSearch.H
Foam::triSurfaceSearch
Helper class to search on triSurface.
Definition:
triSurfaceSearch.H:55
samples
scalarField samples(nIntervals, 0)
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition:
PrimitivePatch.H:87
Foam::Field< vector >
Foam::treeDataPrimitivePatch
Encapsulation of data needed to search on PrimitivePatches.
Definition:
treeDataPrimitivePatch.H:61
indexedOctree.H
pointIndexHit.H
Foam::labelledTri
Triangle with additional region number.
Definition:
labelledTri.H:57
Foam::triSurfaceRegionSearch::treeByRegion
const PtrList< treeType > & treeByRegion() const
Demand driven construction of octree for each region.
Definition:
triSurfaceRegionSearch.C:71
PtrList.H
Foam::indexedOctree
Non-pointer based hierarchical recursive searching.
Definition:
treeDataEdge.H:47
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition:
List.H:63
labelledTri.H
Foam::triSurface
Triangulated surface description with patch information.
Definition:
triSurface.H:66
Foam::IndirectList
A List with indirect addressing.
Definition:
IndirectList.H:102
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:30
IndirectList.H
Generated by
1.8.13