From ca367eed163dc83033132470affcdd922465c0ee Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 18 Aug 2011 10:10:24 +0100 Subject: [PATCH] ENH: Further AMI updates --- src/AMIInterpolation/AMIInterpolation.C | 85 ++++++++++++------- src/AMIInterpolation/AMIInterpolation.H | 3 - .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 6 +- 3 files changed, 56 insertions(+), 38 deletions(-) diff --git a/src/AMIInterpolation/AMIInterpolation.C b/src/AMIInterpolation/AMIInterpolation.C index 98036386cc..03854ac029 100644 --- a/src/AMIInterpolation/AMIInterpolation.C +++ b/src/AMIInterpolation/AMIInterpolation.C @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "AMIInterpolation.H" -#include "Random.H" #include "treeDataPrimitivePatch.H" #include "indexedOctree.H" #include "meshTools.H" @@ -527,19 +526,18 @@ Foam::label Foam::AMIInterpolation::findTargetFace { label targetFaceI = -1; - Random rndGen(123456); - treeBoundBox bb(tgtPatch.points()); + bb.inflate(0.01); typedef treeDataPrimitivePatch treeType; indexedOctree tree ( treeType(false, tgtPatch), - bb.extend(rndGen, 1E-4), // overall search domain - 8, // maxLevel - 10, // leafsize - 3.0 // duplicity + bb, // overall search domain + 8, // maxLevel + 10, // leaf size + 3.0 // duplicity ); const pointField& srcPts = srcPatch.points(); @@ -1153,6 +1151,7 @@ void Foam::AMIInterpolation::update addressing[addrI] = globalSrcFaces.toGlobal(addressing[addrI]); } } + globalIndex globalTgtFaces(tgtAddress_.size()); forAll(srcAddress_, i) { @@ -1163,13 +1162,34 @@ void Foam::AMIInterpolation::update } } - if (debug) - { - writeWeights(srcWeights_, srcPatch, "VTK", "source"); - writeWeights(tgtWeights_, newTgtPatch, "VTK", "target"); - } // send maps +/* + mapDistribute::distribute + ( + Pstream::nonBlocking, + List(), + srcPatch.size(), + map.constructMap(), + map.subMap(), + srcAddress_, + ListPlusEqOp