mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -45,7 +45,7 @@ multiLevelCoeffs
|
|||||||
|
|
||||||
level0
|
level0
|
||||||
{
|
{
|
||||||
numberOfSubdomains 2;
|
numberOfSubdomains 64;
|
||||||
//method simple;
|
//method simple;
|
||||||
//simpleCoeffs
|
//simpleCoeffs
|
||||||
//{
|
//{
|
||||||
|
|||||||
@ -37,7 +37,8 @@ defineTypeNameAndDebug(Foam::treeDataPoint, 0);
|
|||||||
|
|
||||||
Foam::treeDataPoint::treeDataPoint(const pointField& points)
|
Foam::treeDataPoint::treeDataPoint(const pointField& points)
|
||||||
:
|
:
|
||||||
points_(points)
|
points_(points),
|
||||||
|
useSubset_(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -48,7 +49,8 @@ Foam::treeDataPoint::treeDataPoint
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
points_(points),
|
points_(points),
|
||||||
pointLabels_(pointLabels)
|
pointLabels_(pointLabels),
|
||||||
|
useSubset_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -56,7 +58,7 @@ Foam::treeDataPoint::treeDataPoint
|
|||||||
|
|
||||||
Foam::pointField Foam::treeDataPoint::shapePoints() const
|
Foam::pointField Foam::treeDataPoint::shapePoints() const
|
||||||
{
|
{
|
||||||
if (pointLabels_.size())
|
if (useSubset_)
|
||||||
{
|
{
|
||||||
return pointField(points_, pointLabels_);
|
return pointField(points_, pointLabels_);
|
||||||
}
|
}
|
||||||
@ -86,7 +88,7 @@ bool Foam::treeDataPoint::overlaps
|
|||||||
const treeBoundBox& cubeBb
|
const treeBoundBox& cubeBb
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
label pointI = (pointLabels_.size() ? pointLabels_[index] : index);
|
label pointI = (useSubset_ ? pointLabels_[index] : index);
|
||||||
return cubeBb.contains(points_[pointI]);
|
return cubeBb.contains(points_[pointI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +108,7 @@ void Foam::treeDataPoint::findNearest
|
|||||||
forAll(indices, i)
|
forAll(indices, i)
|
||||||
{
|
{
|
||||||
const label index = indices[i];
|
const label index = indices[i];
|
||||||
label pointI = (pointLabels_.size() ? pointLabels_[index] : index);
|
label pointI = (useSubset_ ? pointLabels_[index] : index);
|
||||||
|
|
||||||
const point& pt = points_[pointI];
|
const point& pt = points_[pointI];
|
||||||
|
|
||||||
@ -141,7 +143,7 @@ void Foam::treeDataPoint::findNearest
|
|||||||
forAll(indices, i)
|
forAll(indices, i)
|
||||||
{
|
{
|
||||||
const label index = indices[i];
|
const label index = indices[i];
|
||||||
label pointI = (pointLabels_.size() ? pointLabels_[index] : index);
|
label pointI = (useSubset_ ? pointLabels_[index] : index);
|
||||||
|
|
||||||
const point& shapePt = points_[pointI];
|
const point& shapePt = points_[pointI];
|
||||||
|
|
||||||
|
|||||||
@ -65,6 +65,8 @@ class treeDataPoint
|
|||||||
//- Subset of points to work on (or empty)
|
//- Subset of points to work on (or empty)
|
||||||
const labelList pointLabels_;
|
const labelList pointLabels_;
|
||||||
|
|
||||||
|
const bool useSubset_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Declare name of the class and its debug switch
|
// Declare name of the class and its debug switch
|
||||||
@ -88,7 +90,7 @@ public:
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
pointLabels_.size()
|
useSubset_
|
||||||
? pointLabels_.size()
|
? pointLabels_.size()
|
||||||
: points_.size()
|
: points_.size()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -11,5 +11,5 @@ LIB_LIBS = \
|
|||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lsurfMesh \
|
-lsurfMesh \
|
||||||
-ltriSurface \
|
-ltriSurface \
|
||||||
-lconversion \
|
-llagrangian \
|
||||||
-llagrangian
|
-lconversion
|
||||||
|
|||||||
Reference in New Issue
Block a user