From f93ae77a86c7ddd2949f66a345acb5cb23854246 Mon Sep 17 00:00:00 2001 From: andy <andy> Date: Wed, 16 Nov 2011 14:57:58 +0000 Subject: [PATCH] ENH: Added output of AMI processor split for debugging --- .../AMIInterpolation/AMIInterpolation.C | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index e35a35b6e65..1ebf90faf0c 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -190,6 +190,8 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution const primitivePatch& tgtPatch ) { + label procI = 0; + if (Pstream::parRun()) { List<label> facesPresentOnProc(Pstream::nProcs(), 0); @@ -209,16 +211,27 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution if (nHaveFaces > 1) { - return -1; + procI = -1; + if (debug) + { + Info<< "AMIInterpolation::calcDistribution: " + << "AMI split across multiple processors" << endl; + } } else if (nHaveFaces == 1) { - return findIndex(facesPresentOnProc, 1); + procI = findIndex(facesPresentOnProc, 1); + if (debug) + { + Info<< "AMIInterpolation::calcDistribution: " + << "AMI local to processor" << procI << endl; + } } } + // Either not parallel or no faces on any processor - return 0; + return procI; } @@ -1814,7 +1827,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update if (debug) { - Info<< "AMIInterpolation : Constructed addressing and weights." << nl + Info<< "AMIInterpolation : Constructed addressing and weights" << nl << " triMode :" << triMode_ << nl << " singlePatchProc:" << singlePatchProc_ << nl << " srcMagSf :" << gSum(srcMagSf_) << nl -- GitLab