Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
26ec3702
Commit
26ec3702
authored
Mar 22, 2018
by
Mark Olesen
Browse files
Merge remote-tracking branch 'origin/master' into safe-develop
parents
592692a0
6e05c73c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
View file @
26ec3702
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016
-2018
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -2560,6 +2560,11 @@ Foam::labelBits Foam::indexedOctree<Type>::findNode
template
<
class
Type
>
Foam
::
label
Foam
::
indexedOctree
<
Type
>::
findInside
(
const
point
&
sample
)
const
{
if
(
nodes_
.
empty
())
{
return
-
1
;
}
labelBits
index
=
findNode
(
0
,
sample
);
const
node
&
nod
=
nodes_
[
getNode
(
index
)];
...
...
@@ -2592,6 +2597,11 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices
const
point
&
sample
)
const
{
if
(
nodes_
.
empty
())
{
return
emptyList
<
label
>
();
}
labelBits
index
=
findNode
(
0
,
sample
);
const
node
&
nod
=
nodes_
[
getNode
(
index
)];
...
...
@@ -2603,10 +2613,8 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices
{
return
contents_
[
getContent
(
contentIndex
)];
}
else
{
return
emptyList
<
label
>
();
}
return
emptyList
<
label
>
();
}
...
...
@@ -2688,18 +2696,21 @@ void Foam::indexedOctree<Type>::findNear
CompareOp
&
cop
)
const
{
findNear
(
nearDist
,
true
,
*
this
,
nodePlusOctant
(
0
,
0
),
bb
(),
tree2
,
nodePlusOctant
(
0
,
0
),
tree2
.
bb
(),
cop
);
if
(
!
nodes_
.
empty
())
{
findNear
(
nearDist
,
true
,
*
this
,
nodePlusOctant
(
0
,
0
),
bb
(),
tree2
,
nodePlusOctant
(
0
,
0
),
tree2
.
bb
(),
cop
);
}
}
...
...
@@ -2711,6 +2722,11 @@ void Foam::indexedOctree<Type>::print
const
label
nodeI
)
const
{
if
(
nodes_
.
empty
())
{
return
;
}
const
node
&
nod
=
nodes_
[
nodeI
];
const
treeBoundBox
&
bb
=
nod
.
bb_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment