BUG: AMIInterpolation: tgtMagSf not adapted for sent over patches

This commit is contained in:
mattijs
2016-04-20 17:26:14 +01:00
parent 49ddb1d1a8
commit 8ad0f550ba

View File

@ -962,6 +962,13 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
newTgtPoints newTgtPoints
); );
scalarField newTgtMagSf(newTgtPatch.size());
forAll(newTgtPatch, faceI)
{
newTgtMagSf[faceI] = newTgtPatch[faceI].mag(newTgtPatch.points());
}
// calculate AMI interpolation // calculate AMI interpolation
autoPtr<AMIMethod<SourcePatch, TargetPatch> > AMIPtr autoPtr<AMIMethod<SourcePatch, TargetPatch> > AMIPtr
( (
@ -971,7 +978,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
srcPatch, srcPatch,
newTgtPatch, newTgtPatch,
srcMagSf_, srcMagSf_,
tgtMagSf_, newTgtMagSf,
triMode_, triMode_,
reverseTarget_, reverseTarget_,
requireMatch_ && (lowWeightCorrection_ < 0) requireMatch_ && (lowWeightCorrection_ < 0)
@ -993,6 +1000,11 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
// tgtAddress_ : per newTgtPatch (not tgtPatch) face a list of the // tgtAddress_ : per newTgtPatch (not tgtPatch) face a list of the
// srcPatch faces it overlaps // srcPatch faces it overlaps
if (debug)
{
writeFaceConnectivity(srcPatch, newTgtPatch, srcAddress_);
}
// Rework newTgtPatch indices into globalIndices of tgtPatch // Rework newTgtPatch indices into globalIndices of tgtPatch
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -1056,11 +1068,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
List<Map<label> > cMap; List<Map<label> > cMap;
srcMapPtr_.reset(new mapDistribute(globalSrcFaces, tgtAddress_, cMap)); srcMapPtr_.reset(new mapDistribute(globalSrcFaces, tgtAddress_, cMap));
tgtMapPtr_.reset(new mapDistribute(globalTgtFaces, srcAddress_, cMap)); tgtMapPtr_.reset(new mapDistribute(globalTgtFaces, srcAddress_, cMap));
if (debug)
{
writeFaceConnectivity(srcPatch, newTgtPatch, srcAddress_);
}
} }
else else
{ {