BUG: Corrected normal face calculation for reversed target patch

This commit is contained in:
andy
2011-11-29 18:12:49 +00:00
parent ccd7b41ef7
commit c03ddde3f0

View File

@ -904,8 +904,17 @@ Foam::scalar Foam::AMIInterpolation<SourcePatch, TargetPatch>::interArea
// create intersection object
faceAreaIntersect inter(srcPoints, tgtPoints, reverseTarget_);
// crude resultant norm - face normals should be opposite
const vector n = 0.5*(tgt.normal(tgtPoints) - src.normal(srcPoints));
// crude resultant norm
vector n(-src.normal(srcPoints));
if (reverseTarget_)
{
n -= tgt.normal(tgtPoints);
}
else
{
n += tgt.normal(tgtPoints);
}
n *= 0.5;
scalar area = 0;
if (mag(n) > ROOTVSMALL)