From 592fb7c942a0b8f93b22afe1d91c0342fd607339 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 15 Apr 2011 17:24:30 +0100 Subject: [PATCH 1/4] BUG: treeDataPoint: work with empty subset. --- src/meshTools/indexedOctree/treeDataPoint.C | 14 ++++++++------ src/meshTools/indexedOctree/treeDataPoint.H | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/meshTools/indexedOctree/treeDataPoint.C b/src/meshTools/indexedOctree/treeDataPoint.C index 1685b3b4e9..8245c9438d 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.C +++ b/src/meshTools/indexedOctree/treeDataPoint.C @@ -37,7 +37,8 @@ defineTypeNameAndDebug(Foam::treeDataPoint, 0); Foam::treeDataPoint::treeDataPoint(const pointField& points) : - points_(points) + points_(points), + useSubset_(false) {} @@ -48,7 +49,8 @@ Foam::treeDataPoint::treeDataPoint ) : points_(points), - pointLabels_(pointLabels) + pointLabels_(pointLabels), + useSubset_(true) {} @@ -56,7 +58,7 @@ Foam::treeDataPoint::treeDataPoint Foam::pointField Foam::treeDataPoint::shapePoints() const { - if (pointLabels_.size()) + if (useSubset_) { return pointField(points_, pointLabels_); } @@ -86,7 +88,7 @@ bool Foam::treeDataPoint::overlaps const treeBoundBox& cubeBb ) const { - label pointI = (pointLabels_.size() ? pointLabels_[index] : index); + label pointI = (useSubset_ ? pointLabels_[index] : index); return cubeBb.contains(points_[pointI]); } @@ -106,7 +108,7 @@ void Foam::treeDataPoint::findNearest forAll(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]; @@ -141,7 +143,7 @@ void Foam::treeDataPoint::findNearest forAll(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]; diff --git a/src/meshTools/indexedOctree/treeDataPoint.H b/src/meshTools/indexedOctree/treeDataPoint.H index 336479d69b..eafb94e640 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.H +++ b/src/meshTools/indexedOctree/treeDataPoint.H @@ -65,6 +65,8 @@ class treeDataPoint //- Subset of points to work on (or empty) const labelList pointLabels_; + const bool useSubset_; + public: // Declare name of the class and its debug switch @@ -88,7 +90,7 @@ public: { return ( - pointLabels_.size() + useSubset_ ? pointLabels_.size() : points_.size() ); From 8736c509e057bbf57cb09ac84c514ad24e42362a Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 15 Apr 2011 17:25:36 +0100 Subject: [PATCH 2/4] COMP: sampling/Make/options: remove conversion lib --- src/sampling/Make/options | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sampling/Make/options b/src/sampling/Make/options index 9a82299c41..3f6a7a4226 100644 --- a/src/sampling/Make/options +++ b/src/sampling/Make/options @@ -11,5 +11,4 @@ LIB_LIBS = \ -lmeshTools \ -lsurfMesh \ -ltriSurface \ - -lconversion \ -llagrangian From dd52f4c0ea5411b0d7a8fb79b33f9793e73d824c Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 18 Apr 2011 09:41:37 +0100 Subject: [PATCH 3/4] ENH: decomposeParDict: changed --- .../utilities/parallelProcessing/decomposePar/decomposeParDict | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict index 9ffb82c573..26283baa2e 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict +++ b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict @@ -45,7 +45,7 @@ multiLevelCoeffs level0 { - numberOfSubdomains 2; + numberOfSubdomains 64; //method simple; //simpleCoeffs //{ From 804b801458b7691a1dd4bd31a53bce5c4ae3269a Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 18 Apr 2011 10:07:15 +0100 Subject: [PATCH 4/4] COMP: sampling/Make/options: missing dependency --- src/sampling/Make/options | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sampling/Make/options b/src/sampling/Make/options index 3f6a7a4226..3fbc509d54 100644 --- a/src/sampling/Make/options +++ b/src/sampling/Make/options @@ -11,4 +11,5 @@ LIB_LIBS = \ -lmeshTools \ -lsurfMesh \ -ltriSurface \ - -llagrangian + -llagrangian \ + -lconversion