mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Corrected normal face calculation for reversed target patch
This commit is contained in:
@ -904,8 +904,17 @@ Foam::scalar Foam::AMIInterpolation<SourcePatch, TargetPatch>::interArea
|
|||||||
// create intersection object
|
// create intersection object
|
||||||
faceAreaIntersect inter(srcPoints, tgtPoints, reverseTarget_);
|
faceAreaIntersect inter(srcPoints, tgtPoints, reverseTarget_);
|
||||||
|
|
||||||
// crude resultant norm - face normals should be opposite
|
// crude resultant norm
|
||||||
const vector n = 0.5*(tgt.normal(tgtPoints) - src.normal(srcPoints));
|
vector n(-src.normal(srcPoints));
|
||||||
|
if (reverseTarget_)
|
||||||
|
{
|
||||||
|
n -= tgt.normal(tgtPoints);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
n += tgt.normal(tgtPoints);
|
||||||
|
}
|
||||||
|
n *= 0.5;
|
||||||
|
|
||||||
scalar area = 0;
|
scalar area = 0;
|
||||||
if (mag(n) > ROOTVSMALL)
|
if (mag(n) > ROOTVSMALL)
|
||||||
|
|||||||
Reference in New Issue
Block a user