Skip to content
Snippets Groups Projects
Commit 8e91b8f0 authored by andy's avatar andy
Browse files

BUG: Corrected AMI when running in parallel

parent 1f5f4579
Branches
Tags
No related merge requests found
......@@ -917,22 +917,23 @@ Foam::scalar Foam::AMIInterpolation<SourcePatch, TargetPatch>::interArea
const primitivePatch& tgtPatch
) const
{
const pointField& srcPoints = srcPatch.points();
const pointField& tgtPoints = tgtPatch.points();
// references to candidate faces
const face& src = srcPatch[srcFaceI];
const face& tgt = tgtPatch[tgtFaceI];
// quick reject if either face has zero area
if (srcMagSf_[srcFaceI] < ROOTVSMALL || tgtMagSf_[tgtFaceI] < ROOTVSMALL)
// Note: do not used stored face areas for target patch
if ((srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgt.mag(tgtPoints) < ROOTVSMALL))
{
return 0.0;
}
const pointField& srcPoints = srcPatch.points();
const pointField& tgtPoints = tgtPatch.points();
// create intersection object
faceAreaIntersect inter(srcPoints, tgtPoints, reverseTarget_);
// references to candidate faces
const face& src = srcPatch[srcFaceI];
const face& tgt = tgtPatch[tgtFaceI];
// crude resultant norm
vector n(-src.normal(srcPoints));
if (reverseTarget_)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment