From bda3d30f81799abadf5fa4bfea550d6ecd0c41a6 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 7 Feb 2012 14:10:34 +0000 Subject: [PATCH] BUG: cloudSet.C: force early construction of tetBasePtIs to avoid demand-driven comms --- src/sampling/sampledSet/cloud/cloudSet.C | 7 ++++++- src/sampling/sampledSet/patchCloud/patchCloudSet.C | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sampling/sampledSet/cloud/cloudSet.C b/src/sampling/sampledSet/cloud/cloudSet.C index 419fea0a..223f449a 100644 --- a/src/sampling/sampledSet/cloud/cloudSet.C +++ b/src/sampling/sampledSet/cloud/cloudSet.C @@ -51,9 +51,14 @@ void Foam::cloudSet::calcSamples DynamicList& samplingCurveDist ) const { + // Force calculation of face-diagonals + (void)mesh().tetBasePtIs(); + + const meshSearch& queryMesh = searchEngine(); + forAll(sampleCoords_, sampleI) { - label cellI = searchEngine().findCell(sampleCoords_[sampleI]); + label cellI = queryMesh.findCell(sampleCoords_[sampleI]); if (cellI != -1) { diff --git a/src/sampling/sampledSet/patchCloud/patchCloudSet.C b/src/sampling/sampledSet/patchCloud/patchCloudSet.C index 80630ca7..1b0b8920 100644 --- a/src/sampling/sampledSet/patchCloud/patchCloudSet.C +++ b/src/sampling/sampledSet/patchCloud/patchCloudSet.C @@ -115,6 +115,8 @@ void Foam::patchCloudSet::calcSamples 3.0 // duplicity ); + // Force calculation of face-diagonal decomposition + (void)mesh().tetBasePtIs(); // All the info for nearest. Construct to miss -- 2.11.4.GIT