mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: faceAreaWeightAMI - use cache face normals instead of recalculting
This commit is contained in:
@ -329,15 +329,14 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
|||||||
faceAreaIntersect inter(srcPoints, tgtPoints, this->reverseTarget_);
|
faceAreaIntersect inter(srcPoints, tgtPoints, this->reverseTarget_);
|
||||||
|
|
||||||
// crude resultant norm
|
// crude resultant norm
|
||||||
vector n(-src.normal(srcPoints));
|
vector n(-this->srcPatch_.faceNormals()[srcFaceI]);
|
||||||
n /= mag(n);
|
|
||||||
if (this->reverseTarget_)
|
if (this->reverseTarget_)
|
||||||
{
|
{
|
||||||
n -= tgt.normal(tgtPoints)/tgtMag;
|
n -= this->tgtPatch_.faceNormals()[tgtFaceI];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
n += tgt.normal(tgtPoints)/tgtMag;
|
n += this->tgtPatch_.faceNormals()[tgtFaceI];
|
||||||
}
|
}
|
||||||
n *= 0.5;
|
n *= 0.5;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user