mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into safe-develop
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -2560,6 +2560,11 @@ Foam::labelBits Foam::indexedOctree<Type>::findNode
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::label Foam::indexedOctree<Type>::findInside(const point& sample) const
|
Foam::label Foam::indexedOctree<Type>::findInside(const point& sample) const
|
||||||
{
|
{
|
||||||
|
if (nodes_.empty())
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
labelBits index = findNode(0, sample);
|
labelBits index = findNode(0, sample);
|
||||||
|
|
||||||
const node& nod = nodes_[getNode(index)];
|
const node& nod = nodes_[getNode(index)];
|
||||||
@ -2592,6 +2597,11 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices
|
|||||||
const point& sample
|
const point& sample
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
if (nodes_.empty())
|
||||||
|
{
|
||||||
|
return emptyList<label>();
|
||||||
|
}
|
||||||
|
|
||||||
labelBits index = findNode(0, sample);
|
labelBits index = findNode(0, sample);
|
||||||
|
|
||||||
const node& nod = nodes_[getNode(index)];
|
const node& nod = nodes_[getNode(index)];
|
||||||
@ -2603,11 +2613,9 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices
|
|||||||
{
|
{
|
||||||
return contents_[getContent(contentIndex)];
|
return contents_[getContent(contentIndex)];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return emptyList<label>();
|
return emptyList<label>();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -2687,6 +2695,8 @@ void Foam::indexedOctree<Type>::findNear
|
|||||||
const indexedOctree<Type>& tree2,
|
const indexedOctree<Type>& tree2,
|
||||||
CompareOp& cop
|
CompareOp& cop
|
||||||
) const
|
) const
|
||||||
|
{
|
||||||
|
if (!nodes_.empty())
|
||||||
{
|
{
|
||||||
findNear
|
findNear
|
||||||
(
|
(
|
||||||
@ -2701,6 +2711,7 @@ void Foam::indexedOctree<Type>::findNear
|
|||||||
cop
|
cop
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -2711,6 +2722,11 @@ void Foam::indexedOctree<Type>::print
|
|||||||
const label nodeI
|
const label nodeI
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
if (nodes_.empty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const node& nod = nodes_[nodeI];
|
const node& nod = nodes_[nodeI];
|
||||||
const treeBoundBox& bb = nod.bb_;
|
const treeBoundBox& bb = nod.bb_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user